]> git.baikalelectronics.ru Git - kernel.git/commit
net/tunnel: set inner protocol in network gro hooks
authorPaolo Abeni <pabeni@redhat.com>
Tue, 7 Mar 2017 17:33:31 +0000 (18:33 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Mar 2017 21:19:52 +0000 (13:19 -0800)
commitace66bdf10a2dcd5463bb6f342492e961058609b
treeda8ec41e8eb09a842834979d8a1ee01197a38dd1
parent1c62bd431aa3ad8f6ea08e3975dd1ceacf087410
net/tunnel: set inner protocol in network gro hooks

The gso code of several tunnels type (gre and udp tunnels)
takes for granted that the skb->inner_protocol is properly
initialized and drops the packet elsewhere.

On the forwarding path no one is initializing such field,
so gro encapsulated packets are dropped on forward.

Since commit d2ff325d9549 ("gre: Use inner_proto to obtain
inner header protocol"), this can be reproduced when the
encapsulated packets use gre as the tunneling protocol.

The issue happens also with vxlan and geneve tunnels since
commit 62e3ca7d0597 ("udp: Generalize skb_udp_segment"), if the
forwarding host's ingress nic has h/w offload for such tunnel
and a vxlan/geneve device is configured on top of it, regardless
of the configured peer address and vni.

To address the issue, this change initialize the inner_protocol
field for encapsulated packets in both ipv4 and ipv6 gro complete
callbacks.

Fixes: d2ff325d9549 ("gre: Use inner_proto to obtain inner header protocol")
Fixes: 62e3ca7d0597 ("udp: Generalize skb_udp_segment")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/af_inet.c
net/ipv6/ip6_offload.c