提交 aa47e42c 编写于 作者: P Pablo Neira Ayuso

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: NPablo Neira Ayuso <pablo@netfilter.org>
上级 73796d8b
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册