Browse Source

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>
Liping Zhang 9 years ago
parent
commit
c73c248490
1 changed files with 0 additions and 1 deletions
  1. 0 1
      net/netfilter/nf_tables_netdev.c

+ 0 - 1
net/netfilter/nf_tables_netdev.c

@@ -30,7 +30,6 @@ nft_netdev_set_pktinfo_ipv4(struct nft_pktinfo *pkt,
 	if (!iph)
 	if (!iph)
 		return;
 		return;
 
 
-	iph = ip_hdr(skb);
 	if (iph->ihl < 5 || iph->version != 4)
 	if (iph->ihl < 5 || iph->version != 4)
 		return;
 		return;