Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / include / net / netfilter / nf_tables_ipv6.h
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
7 static inline int
8 nft_set_pktinfo_ipv6(struct nft_pktinfo *pkt,
9                      const struct nf_hook_ops *ops,
10                      struct sk_buff *skb,
11                      const struct nf_hook_state *state)
12 {
13         int protohdr, thoff = 0;
14         unsigned short frag_off;
15
16         nft_set_pktinfo(pkt, ops, skb, state);
17
18         protohdr = ipv6_find_hdr(pkt->skb, &thoff, -1, &frag_off, NULL);
19         /* If malformed, drop it */
20         if (protohdr < 0)
21                 return -1;
22
23         pkt->tprot = protohdr;
24         pkt->xt.thoff = thoff;
25         pkt->xt.fragoff = frag_off;
26
27         return 0;
28 }
29
30 extern struct nft_af_info nft_af_ipv6;
31
32 #endif