diff options
author | Patrick McHardy <kaber@trash.net> | 2014-01-03 16:16:18 +0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-01-08 02:57:31 +0400 |
commit | 4566bf27069b7780e453cffb24ea5f5323059885 (patch) | |
tree | 216307284d8588c3a1250dc01c956f4b40b9809c /include/net/netfilter/nf_tables_ipv4.h | |
parent | 124edfa9e0451e97d621cd2796a44ff499e21036 (diff) | |
download | linux-4566bf27069b7780e453cffb24ea5f5323059885.tar.xz |
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.h | 3 |
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; } |