net/packet: fix packet drop as of virtio gso
authorJianfeng Tan <jianfeng.tan@linux.alibaba.com>
Sat, 29 Sep 2018 15:41:27 +0000 (15:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:16:19 +0000 (09:16 +0200)
commit5150140b4ea7ac8401deaebec03e619988a3804b
tree3a8b8f9f6d2e09f1034cbdac90713b9a46a697a4
parent5e7bb38dc696b672b75de0539a75e776f023fe9b
net/packet: fix packet drop as of virtio gso

[ Upstream commit 9d2f67e43b73e8af7438be219b66a5de0cfa8bd9 ]

When we use raw socket as the vhost backend, a packet from virito with
gso offloading information, cannot be sent out in later validaton at
xmit path, as we did not set correct skb->protocol which is further used
for looking up the gso function.

To fix this, we set this field according to virito hdr information.

Fixes: e858fae2b0b8f4 ("virtio_net: use common code for virtio_net_hdr and skb GSO conversion")
Signed-off-by: Jianfeng Tan <jianfeng.tan@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/virtio_net.h
net/packet/af_packet.c