Skip to content

Commit

Permalink
netfilter: nf_tables_netdev: remove redundant ip_hdr assignment
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
  • Loading branch information
Liping Zhang authored and ummakynes committed Aug 30, 2016
1 parent 4249fc1 commit c73c248
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/netfilter/nf_tables_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit c73c248

Please sign in to comment.