net: ip_gre: use erspan key field for tunnel lookup
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Fri, 18 Jan 2019 11:05:39 +0000 (12:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Feb 2019 16:30:06 +0000 (17:30 +0100)
commit0a198e0bb8bef51ced179702ad1af6f9e3715b64
treedd7711aa0b5ba877a2dc2b9d2e6d026c6e6bb4b8
parent897ea28bd2f96b88942d828f92bf223895d8ed0b
net: ip_gre: use erspan key field for tunnel lookup

[ Upstream commit cb73ee40b1b381eaf3749e6dbeed567bb38e5258 ]

Use ERSPAN key header field as tunnel key in gre_parse_header routine
since ERSPAN protocol sets the key field of the external GRE header to
0 resulting in a tunnel lookup fail in ip6gre_err.
In addition remove key field parsing and pskb_may_pull check in
erspan_rcv and ip6erspan_rcv

Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/gre_demux.c
net/ipv4/ip_gre.c
net/ipv6/ip6_gre.c