From: David Miller Subject: Re: [PATCH v2 net] net-gro: reset skb->pkt_type in napi_reuse_skb() Date: Sat, 17 Nov 2018 22:00:45 -0800 (PST) Message-ID: <20181117.220045.440936435362041574.davem@davemloft.net> References: <20181118055702.150046-1-edumazet@google.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com To: edumazet@google.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:42164 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726034AbeKRQUD (ORCPT ); Sun, 18 Nov 2018 11:20:03 -0500 In-Reply-To: <20181118055702.150046-1-edumazet@google.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet Date: Sat, 17 Nov 2018 21:57:02 -0800 > 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 I was wondering about that WARN_ON in v1 :-) Applied and queued up for -stable.