linux/net/core
Eric Dumazet 843e4e5864 net-gro: reset skb->pkt_type in napi_reuse_skb()
commit 33d9a2c72f upstream.

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: Ben Hutchings <ben@decadent.org.uk>
History 2019-02-11 17:54:05 +00:00
..
datagram.c Revert "[stable-only] net: add length argument to skb_copy_and_csum_datagram_iovec" 2016-01-25 10:44:07 +00:00
dev.c net-gro: reset skb->pkt_type in napi_reuse_skb() 2019-02-11 17:54:05 +00:00
dev_addr_lists.c net: fix uninit-value in __hw_addr_add_ex() 2018-10-21 08:45:18 +01:00
dev_ioctl.c net_tstamp: Add SIOCGHWTSTAMP ioctl to match SIOCSHWTSTAMP 2013-11-19 19:07:21 +00:00
drop_monitor.c drop_monitor: consider inserted data in genlmsg_end 2017-03-16 02:27:22 +00:00
dst.c ipv4: add reference counting to metrics 2017-11-11 13:33:21 +00:00
ethtool.c ethtool: Use kcalloc instead of kmalloc for ethtool_get_strings 2015-10-28 10:33:20 +00:00
fib_rules.c fib_rules: Fix dump_rules() not to exit early 2015-10-19 11:23:19 +01:00
filter.c rose: limit sk_filter trim to payload 2017-02-23 03:54:46 +00:00
flow.c flowcache: Fix kernel panic in flow_cache_flush_task 2015-03-12 15:46:26 +00:00
flow_dissector.c net: Rename skb->rxhash to skb->hash 2014-03-26 15:58:20 -04:00
gen_estimator.c net_sched: add 64bit rate estimators 2013-06-11 02:51:03 -07:00
gen_stats.c gen_stats.c: Duplicate xstats buffer for later use 2015-03-12 16:27:17 +00:00
iovec.c net: sendmsg: fix NULL pointer dereference 2014-07-29 12:20:22 -07:00
link_watch.c arch: Mass conversion of smp_mb__*() 2014-04-18 14:20:48 +02:00
Makefile net: Add a software TSO helper API 2014-05-22 14:57:15 -04:00
neighbour.c net: fix deadlock while clearing neighbor proxy table 2018-10-21 08:45:24 +01:00
net-procfs.c rps: selective flow shedding during softnet overflow 2013-05-20 13:48:04 -07:00
net-sysfs.c net: don't decrement kobj reference count on init failure 2017-11-26 13:50:21 +00:00
net-sysfs.h net: netdev_kobject_init: annotate with __init 2014-01-05 20:27:54 -05:00
net-traces.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
net_namespace.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-05-24 00:32:30 -04:00
netclassid_cgroup.c cgroup: remove css_parent() 2014-05-16 13:22:48 -04:00
netevent.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
netpoll.c netpoll: Use skb_irq_freeable to make zap_completion_queue safe. 2014-04-01 17:53:36 -04:00
netprio_cgroup.c cgroup: remove css_parent() 2014-05-16 13:22:48 -04:00
pktgen.c dst: Increase alignment of metrics to allow extra flag on pointers 2017-11-11 13:33:20 +00:00
ptp_classifier.c net: filter: let unattached filters use sock_fprog_kern 2014-05-23 16:48:05 -04:00
request_sock.c net: remove unnecessary return's 2014-02-13 18:33:38 -05:00
rtnetlink.c rtnetlink: Disallow FDB configuration for non-Ethernet device 2019-02-11 17:53:44 +00:00
scm.c unix: correctly track in-flight fds in sending process user_struct 2016-02-25 10:51:00 +00:00
secure_seq.c inetpeer: get rid of ip_id_count 2014-06-02 11:00:41 -07:00
skbuff.c net: make skb_partial_csum_set() more robust against overflows 2018-12-16 22:09:40 +00:00
sock.c net: Set sk_prot_creator when cloning sockets to the right proto 2018-09-25 23:47:21 +01:00
sock_diag.c net: Move the permission check in sock_diag_put_filterinfo to packet_diag_dump 2014-04-24 13:44:53 -04:00
stream.c net: replace macros net_random and net_srandom with direct calls to prandom 2014-01-14 15:15:25 -08:00
sysctl_net_core.c net:Add sysctl_max_skb_frags 2016-03-24 10:00:44 +00:00
timestamping.c net: ptp: move PTP classifier in its own file 2014-04-01 16:43:18 -04:00
tso.c net: tso: fix unaligned access to crafted TCP header in helper API 2014-11-05 16:39:43 +00:00
user_dma.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
utils.c net: avoid dependency of net_get_random_once on nop patching 2014-05-14 00:37:34 -04:00