]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 22 Mar 2017 14:02:34 +0000 (08:02 -0600)
commita881ff2fc98dd57c6ad7ffaf102ae6d5f622c6c0
tree00fcf3c1fc2519a6326613e63a165245c03a6f69
parente14614274e852a845317006ecc3177308cdb2fd9
net/tunnel: set inner protocol in network gro hooks

BugLink: http://bugs.launchpad.net/bugs/1675032
[ Upstream commit 294acf1c01bace5cea5d30b510504238bf5f7c25 ]

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 38720352412a ("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 8bce6d7d0d1e ("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: 38720352412a ("gre: Use inner_proto to obtain inner header protocol")
Fixes: 8bce6d7d0d1e ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
net/ipv4/af_inet.c
net/ipv6/ip6_offload.c