summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLiping Zhang <liping.zhang@spreadtrum.com>2016-08-28 16:59:52 +0800
committerPablo Neira Ayuso <pablo@netfilter.org>2016-08-30 11:41:04 +0200
commitc73c2484901139c28383b58eabcbf4d613e91518 (patch)
treea2c4370d711776cc2f3ec6342e3248399a5355d8 /net
parent4249fc1f023a2106170bbf715e2e1a0ebc2d5b1f (diff)
downloadop-kernel-dev-c73c2484901139c28383b58eabcbf4d613e91518.zip
op-kernel-dev-c73c2484901139c28383b58eabcbf4d613e91518.tar.gz
netfilter: nf_tables_netdev: remove redundant ip_hdr assignment
We have already use skb_header_pointer to get the ip header pointer, so there's no need to use ip_hdr again. Moreover, in NETDEV INGRESS hook, ip header maybe not linear, so use ip_hdr is not appropriate, remove it. Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_tables_netdev.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_netdev.c b/net/netfilter/nf_tables_netdev.c
index 5eefe4a..75d696f 100644
--- a/net/netfilter/nf_tables_netdev.c
+++ b/net/netfilter/nf_tables_netdev.c
@@ -30,7 +30,6 @@ nft_netdev_set_pktinfo_ipv4(struct nft_pktinfo *pkt,
if (!iph)
return;
- iph = ip_hdr(skb);
if (iph->ihl < 5 || iph->version != 4)
return;
OpenPOWER on IntegriCloud