summaryrefslogtreecommitdiff
path: root/include/net/netfilter/nf_tables_ipv4.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2014-01-03 12:16:18 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2014-01-07 23:57:31 +0100
commit4566bf27069b7780e453cffb24ea5f5323059885 (patch)
tree216307284d8588c3a1250dc01c956f4b40b9809c /include/net/netfilter/nf_tables_ipv4.h
parent124edfa9e0451e97d621cd2796a44ff499e21036 (diff)
netfilter: nft_meta: add l4proto support
For L3-proto independant rules we need to get at the L4 protocol value directly. Add it to the nft_pktinfo struct and use the meta expression to retrieve it. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netfilter/nf_tables_ipv4.h')
-rw-r--r--include/net/netfilter/nf_tables_ipv4.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/netfilter/nf_tables_ipv4.h b/include/net/netfilter/nf_tables_ipv4.h
index f7b3a669aad3..cba143fbd2e4 100644
--- a/include/net/netfilter/nf_tables_ipv4.h
+++ b/include/net/netfilter/nf_tables_ipv4.h
@@ -15,8 +15,9 @@ nft_set_pktinfo_ipv4(struct nft_pktinfo *pkt,
nft_set_pktinfo(pkt, ops, skb, in, out);
- pkt->xt.thoff = ip_hdrlen(pkt->skb);
ip = ip_hdr(pkt->skb);
+ pkt->tprot = ip->protocol;
+ pkt->xt.thoff = ip_hdrlen(pkt->skb);
pkt->xt.fragoff = ntohs(ip->frag_off) & IP_OFFSET;
}