]> git.baikalelectronics.ru Git - kernel.git/commit
gre: change gre_parse_header to return the header length
authorJiri Benc <jbenc@redhat.com>
Tue, 3 May 2016 13:00:21 +0000 (15:00 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 May 2016 16:44:45 +0000 (12:44 -0400)
commitf1ac150bbf4cf3d8956d9e02f95123a8f9354888
tree4c1371e6f9b81dbe781c10c2a7109f022ea1caec
parentf0cc7905235ee523ae94dbeca8a07905bb8c761b
gre: change gre_parse_header to return the header length

It's easier for gre_parse_header to return the header length instead of
filing it into a parameter. That way, the callers that don't care about the
header length can just check whether the returned value is lower than zero.

In gre_err, the tunnel header must not be pulled. See commit 85c69a063ef6
("gre: do not pull header in ICMP error processing") for details.

This patch reduces the conflict between the mentioned commit and commit
c20f4d77cc9c ("gre: Move utility functions to common headers").

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Acked-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/gre.h
net/ipv4/gre_demux.c
net/ipv4/ip_gre.c
net/ipv6/ip6_gre.c