diff options
author | Eric Dumazet <edumazet@google.com> | 2018-11-17 21:57:02 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-27 16:07:57 +0100 |
commit | 4dc0c62a488f341fa61458eb415db34bf4723657 (patch) | |
tree | f426d835c05c20fe4f3d30739a4615078a8fcc16 /net/ipv6/route.c | |
parent | 7876c2d6ced154eb7eff3587d75f02eda3a8f45f (diff) |
net-gro: reset skb->pkt_type in napi_reuse_skb()
[ Upstream commit 33d9a2c72f086cbf1087b2fd2d1a15aa9df14a7f ]
eth_type_trans() assumes initial value for skb->pkt_type
is PACKET_HOST.
This is indeed the value right after a fresh skb allocation.
However, it is possible that GRO merged a packet with a different
value (like PACKET_OTHERHOST in case macvlan is used), so
we need to make sure napi->skb will have pkt_type set back to
PACKET_HOST.
Otherwise, valid packets might be dropped by the stack because
their pkt_type is not PACKET_HOST.
napi_reuse_skb() was added in commit 96e93eab2033 ("gro: Add
internal interfaces for VLAN"), but this bug always has
been there.
Fixes: 96e93eab2033 ("gro: Add internal interfaces for VLAN")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6/route.c')
0 files changed, 0 insertions, 0 deletions