android_kernel_oneplus_msm8998/net/core
Eric Dumazet 4dc0c62a48 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 96e93eab20 ("gro: Add
internal interfaces for VLAN"), but this bug always has
been there.

Fixes: 96e93eab20 ("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>
2018-11-27 16:07:57 +01:00
..
datagram.c
dev.c net-gro: reset skb->pkt_type in napi_reuse_skb() 2018-11-27 16:07:57 +01:00
dev_addr_lists.c net: fix uninit-value in __hw_addr_add_ex() 2018-05-16 10:06:50 +02:00
dev_ioctl.c net: Zero terminate ifr_name in dev_ifname(). 2017-08-11 09:08:52 -07:00
drop_monitor.c drop_monitor: consider inserted data in genlmsg_end 2017-01-15 13:41:35 +01:00
dst.c Fix an intermittent pr_emerg warning about lo becoming free. 2017-07-05 14:37:13 +02:00
dst_cache.c net: dst_cache_per_cpu_dst_set() can be static 2018-02-25 11:03:55 +01:00
ethtool.c ethtool: do not vzalloc(0) on registers dump 2017-06-17 06:39:36 +02:00
fib_rules.c
filter.c bpf: fix 32-bit divide by zero 2018-02-03 17:04:25 +01:00
flow.c
flow_dissector.c flow_dissector: do not dissect l4 ports for fragments 2018-11-27 16:07:56 +01:00
gen_estimator.c
gen_stats.c
link_watch.c
lwtunnel.c
Makefile net: add dst_cache support 2018-02-25 11:03:34 +01:00
neighbour.c neighbour: confirm neigh entries when ARP packet is received 2018-09-29 03:08:52 -07:00
net-procfs.c
net-sysfs.c
net-sysfs.h
net-traces.c
net_namespace.c net: move somaxconn init from sysctl code 2018-04-13 19:50:11 +02:00
netclassid_cgroup.c
netevent.c
netpoll.c netpoll: Check for skb->queue_mapping 2017-05-02 21:19:53 -07:00
netprio_cgroup.c
pktgen.c
ptp_classifier.c
request_sock.c
rtnetlink.c rtnetlink: Disallow FDB configuration for non-Ethernet device 2018-11-10 07:41:42 -08:00
scm.c
secure_seq.c
skbuff.c tcp: use an RB tree for ooo receive queue 2018-10-13 09:11:34 +02:00
sock.c sock_diag: fix use-after-free read in __sk_free 2018-05-26 08:48:58 +02:00
sock_diag.c net: core: fix module type in sock_diag_bind 2018-01-17 09:35:29 +01:00
stream.c
sysctl_net_core.c net: move somaxconn init from sysctl code 2018-04-13 19:50:11 +02:00
timestamping.c
tso.c
utils.c