diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-12-15 21:29:16 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-12-18 14:45:45 +0100 |
commit | aa47e42c60dfa31f81a3fe357451acfe1a12ca1e (patch) | |
tree | fcb1deb5a05a5b414695d7a6c4b888c4bade48c6 | |
parent | 73796d8bf27372e26c2b79881947304c14c2d353 (diff) | |
download | op-kernel-dev-aa47e42c60dfa31f81a3fe357451acfe1a12ca1e.zip op-kernel-dev-aa47e42c60dfa31f81a3fe357451acfe1a12ca1e.tar.gz |
netfilter: nf_tables: use skb->protocol instead of assuming ethernet header
Otherwise we may end up with incorrect network and transport header for
other protocols.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | net/netfilter/nf_tables_netdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_netdev.c b/net/netfilter/nf_tables_netdev.c index 7b9c053..edb3502f 100644 --- a/net/netfilter/nf_tables_netdev.c +++ b/net/netfilter/nf_tables_netdev.c @@ -94,7 +94,7 @@ nft_do_chain_netdev(void *priv, struct sk_buff *skb, { struct nft_pktinfo pkt; - switch (eth_hdr(skb)->h_proto) { + switch (skb->protocol) { case htons(ETH_P_IP): nft_netdev_set_pktinfo_ipv4(&pkt, skb, state); break; |