]> 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)
commit69e8ea63c6148ea5d06ea51224ed6f2c10cc1173
treeda8ec41e8eb09a842834979d8a1ee01197a38dd1
parent50d52f2f42ff792bbfc7c343d0913ff860753b3d
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 acb97fea7f8e ("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 1104efd5636f ("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: acb97fea7f8e ("gre: Use inner_proto to obtain inner header protocol")
Fixes: 1104efd5636f ("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