]> git.baikalelectronics.ru Git - kernel.git/commit
gre: remove superfluous pskb_may_pull
authorJiri Benc <jbenc@redhat.com>
Tue, 3 May 2016 15:10:06 +0000 (17:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 May 2016 18:11:31 +0000 (14:11 -0400)
commitd10ca6bf5221cbcfa07670e506c5acb102519443
tree043bf1c60ccdf86257a34c61b629726247a9d1c8
parentea576e11751e72627cf40908227f6ed58bb89508
gre: remove superfluous pskb_may_pull

The call to gre_parse_header is either followed by iptunnel_pull_header, or
in the case of ICMP error path, the actual header is not accessed at all.

In the first case, iptunnel_pull_header will call pskb_may_pull anyway and
it's pointless to do it twice. The only difference is what call will fail
with what error code but the net effect is still the same in all call sites.

In the second case, pskb_may_pull is pointless, as skb->data is at the outer
IP header and not at the GRE header.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/gre_demux.c