Merge branch 'keys-asym-keyctl' into keys-next
[deliverable/linux.git] / include / net / netfilter / nf_tables_ipv6.h
CommitLineData
0ca743a5
PNA
1#ifndef _NF_TABLES_IPV6_H_
2#define _NF_TABLES_IPV6_H_
3
4#include <linux/netfilter_ipv6/ip6_tables.h>
5#include <net/ipv6.h>
6
7static inline int
8nft_set_pktinfo_ipv6(struct nft_pktinfo *pkt,
0ca743a5 9 struct sk_buff *skb,
073bfd56 10 const struct nf_hook_state *state)
0ca743a5
PNA
11{
12 int protohdr, thoff = 0;
13 unsigned short frag_off;
14
6aa187f2 15 nft_set_pktinfo(pkt, skb, state);
0ca743a5
PNA
16
17 protohdr = ipv6_find_hdr(pkt->skb, &thoff, -1, &frag_off, NULL);
18 /* If malformed, drop it */
19 if (protohdr < 0)
20 return -1;
21
4566bf27 22 pkt->tprot = protohdr;
0ca743a5
PNA
23 pkt->xt.thoff = thoff;
24 pkt->xt.fragoff = frag_off;
25
26 return 0;
27}
28
1d49144c
PM
29extern struct nft_af_info nft_af_ipv6;
30
0ca743a5 31#endif
This page took 0.268011 seconds and 5 git commands to generate.