Article View: linux.kernel.netdev
Article #9626Re: [PATCH net v2] net: parse the eighth nested VLAN tag
From: Avi
Date: Mon, 02 Nov 2026 12:57
Date: Mon, 02 Nov 2026 12:57
34 lines
12944 bytes
12944 bytes
OK no worries Andrew.
The motivation was just a correctness fix to align the parser with the
intention of the original commit, which set VLAN_MAX_DEPTH to 8.
I'll re-submit to net-next when the window reopens.
cheers,
avi
On Sun, Nov 1, 2026 at 9:50 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Sun, Nov 01, 2026 at 04:58:42PM +0200, Avi Weiss wrote:
> > __vlan_get_protocol_offset() starts with VLAN_MAX_DEPTH (8) but
> > pre-decrements parse_depth before checking it. This rejects the eighth
> > VLAN header and returns protocol 0 instead of the encapsulated EtherType.
> >
> > When skb->mac_len is ETH_HLEN, the first iteration rereads the outer
> > EtherType, so eight VLAN tags require nine iterations. Check the counter
> > before decrementing it and allow one extra iteration in this case.
> >
> > Fixes: 469aceddfa3e ("vlan: consolidate VLAN parsing code and limit max parsing depth")
>
> Do you have a use case for 8 nested VLANs?
>
> Have you seen people reporting issues? Does this bother anybody?
>
> If not, i suggest you drop the Fixes: tag and post to net-next.
>
> Andrew
Technical Details
Message-ID:
<CA+jvY9EydBEkSjveXc1O4o=VjaqSzWFoNCknHr7HgQrH_=EJ+A@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354678-linux-kernel-netdev=dewy.ruReferences:
<20261101145841.687905-2-thnkslprpt@gmail.com> <eb689b84-eab8-4289-a48d-64f13853028e@lunn.ch>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354678-linux-kernel-netdev=dewy.ru
From: thnkslprpt@gmail.com (Avi)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2] net: parse the eighth nested VLAN tag
Date: Mon, 2 Nov 2026 14:57:42 +0200
Organization: Usenet Network
Message-ID: <CA+jvY9EydBEkSjveXc1O4o=VjaqSzWFoNCknHr7HgQrH_=EJ+A@mail.gmail.com>
References: <20261101145841.687905-2-thnkslprpt@gmail.com> <eb689b84-eab8-4289-a48d-64f13853028e@lunn.ch>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="2924788"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:rTmBIycCK1fIxoMghOLBSi1UkRw= sha256:d4E6u8aXKrkOvEh92cd/mkh7mGpM58lez5LVFBuisT0=
sha1:ekPgzpcBP7fUJc5mOWAQFxdZOiw= sha256:KEK1JKodfkPUi/nkok1U/lDKJkkmF2Uo9aczVyPQsTQ=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 84B791124FB; Mon, 2 Nov 2026 15:58:35 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.649
X-Spam-Status: No, score=-1.649 tagged_above=-9999 required=6.31
tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
FROM_LOCAL_NOVOWEL=0.5, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
HK_RANDOM_FROM=1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3,
SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id IgwF4vj6rznd;
Mon, 2 Nov 2026 15:58:33 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-354678-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
by mail.dewy.ru (Postfix) with ESMTPS id 5C5241124F9; Mon, 2 Nov 2026 15:58:24 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sto.lore.kernel.org (Postfix) with ESMTP id 551996017A1; Mon, 2 Nov 2026 12:58:24 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793624302;
b=fRXt0DlXkh5HthQWhYnEVskXoBB/xmx/P4idfAYke5aXxef8hzebB7gSaGrppQX8pJi7
pRbtsdliHlE4o3wAuteRXqO5afERQECGwIbQa8L5EgT4yGspNclpr8Pmb/8nhACh/Oq3C
ZZmpzRmY1RQI8ENAhc6JrJo4uVMDIj6oHfNBNJMThaEpnm8Cckds9N1PwpSiUPoxwhiCb
3bag7g4nbOydRGckUV57O9q88LkH0BUovt/NBPodOQFhM/asn09IgAfIa9YMS/51HocW4
S8Q0HRTlwMPdJyXMMZdwPgS/tPRH8UkkNWuuug0u7YXx9Yl2AXh98P8q9FEDDxyyGUg==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793624302;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:References:
In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:Cc:
Content-Type:Content-Transfer-Encoding;
bh=OQFH2hgC0TDM1sRzbEadUUZlJqc+Evd7f3Bf5CeXHcs=;
b=1YF3yPQDa42udZMNXrfDFT3NCX/NpGLloWDY3NST2NMmxrGQWjY55bHg/+0pKd7kCr0R
8MOQtT/v0he7Br2QSReyLlkG89uEs95tjCSj88gYA9zz4bCWYLRHHbpSQoSWjTOvwpGRg
0+GU/qU3QVX+TsL/8ac0/n4vTI8sDuJzhug/3ie+dK1PFr9SE9AhcMrHTy2aS25vUyxpy
GcywrBqbwl0d+TQpLzPua08EpfWuhidMlYdtisKYZqGqMVeeZBD49O2EWOHGUAP5bIO9W
hNO67IpD6HB5m/EzyqQSSUW8h68SEFcIWT2WT05o20/P57qtIUKoFZg+bMaoEjvjjVw==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=o2KeHr3j;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 307EB606A330;
Mon, 2 Nov 2026 12:58:22 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=o2KeHr3j
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.128.171
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793624301;
b=ncHfAszdoymQuKuzshpm1j9leApb2NIlJajEELj0fLvWw1MYH/N2UOVonNMvCzlhViQi
OUOI/0KuHGDnnbsToXz6E1upTbY4EYjY2VSuF2SxosqA9urivbj2NDb8Np0UpfJicikdx
+IzlAAQiQ6xUxTAJkNMJDKvyB/1VBtmHovHIP5NEWZgypvR9R9A4HWckKZXB1gOHxGvuK
cXbesmNEke1b/daevjd1rZnN3aeuIf2PURLYl0SE1tlHpleE2rBurNhnA8rfSE1bEx/X3
xPp/AUmqE+jBdAXKBql9s6qxWFTGaZQP6WDDPrj57Fd6j7bIJZSBPn+cg3wiNvPaWvQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793624301;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:MIME-Version:References:
In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:Cc:
Content-Type:Content-Transfer-Encoding;
bh=OQFH2hgC0TDM1sRzbEadUUZlJqc+Evd7f3Bf5CeXHcs=;
b=PSoROSkIggiQWE6yFUc9ITIEg+FjGDBvup+B4Fm4KsXs/u2JbgowA815Zc655ybz16C2
KInXXnDMZPLc4aKESwGqUvqIwf80RGofPdR7WJJ0tKulQtKQlUp98AOy/BkPUB3jxjyWS
FOPWBqabJzodY6U1+1uBJ7FvXYRVPYF3Ts0JOn7f5DHSWhetAWIfRdFXCpFOSZnATJqNX
rAJ0dSamHEb7t+aaeTCqOgRV4ScvsnWv1FeN6HlcA4R4kJdFF2aXLo4XD4RAaH+p/kG4F
H+J7/YivyhK6849Q33T+HWFUReN2Hu7F6dEnLWUTpDd9xVYTRS9HHkgUwYQPuQ2HGZQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=o2KeHr3j;
arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.128.171
X-Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com [209.85.128.171])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA15C606A324
for <netdev@vger.kernel.org>; Mon, 2 Nov 2026 12:58:20 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EA15C606A324
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-8ac525c1f05so26523317b3.1
for <netdev@vger.kernel.org>; Mon, 02 Nov 2026 04:58:20 -0800 (PST)
X-ARC-Seal: i=1; a=rsa-sha256; t=1793624300; cv=none;
d=google.com; s=arc-20260327;
b=IGuYnRQsWSY9tGbdrWuLgMdJUSJDjkC8R8wqLMkYoSa7mk2IEQBQVhX2qgKnlcw9v9
N9FcKe9VMjqNoWSw31DVplSgUzZO3Lp7ehLihNbbhBn845GYVfCbKjp4sVoAtlcS8gNo
bWObcWmh5J/yOckBDwj9lGqEXKDNZ5++H+yzggK5X6mSTF2A80IftesARWjPsJR7lQKY
hBsKLYUI5yX2rxoW3G3/Hln0u+cMukck6hiPrsLALF30QHu3rBtmQKvYrIB0vibMM1/+
G/kb5h3OTmQigi9or1PHGtgbYSZjlxmgILuJq9TfrNEK1Q5rpHvoFrIL81rgufaLkaSc
yvaw==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:dkim-signature;
bh=OQFH2hgC0TDM1sRzbEadUUZlJqc+Evd7f3Bf5CeXHcs=;
fh=3u67pbdETZDELoeFL6FBKbDJQC3SFY2XwPi7hNC5Udo=;
b=qft0j/24F77gGnzNgWEIokcJDl6b5M2in8x89ZTap3K4t3l+y9/YSy4c7gmZwgCH+m
ac36gbwID/BFCmECusr0QjSX8S9mq+UmUY0p75ELVINDhKjiRh42BlHAVO+GKm2qlPTk
JYvQm4Ez55XJnxT3PXJaQHeiLzgOgfyq1ZG8A9vc8DAzAKEfduEWCcmm/c6umAUYjF1h
B19iCxrgq7JLhdR236BHDp3ArmLFSTRF3MZZQDC1xwQh6wZ6RnsNPKfKST24bkZDe/R3
+1Mrr5VFEOPmvV+4jfuRLaZwJuHQ1QDXGOo6gpwoblNdpUpBDzPn5Y5j8bqBLeCZ+2y8
2BTA==;
darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1793624300; x=1794229100; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=OQFH2hgC0TDM1sRzbEadUUZlJqc+Evd7f3Bf5CeXHcs=;
b=o2KeHr3jd0uAlP7tCtKprsPT/V+CF7Q9nrspZyMA6zzb2IvLX0F6xhYt+Vtk68udMs
LstIjCs8KvoACCWucSHTQ+9O1tOYxuk4lYea8pIHIyNAtuDpNxVxHxMpYExg/w9Zpr0G
ko5W2rA7PBGHM2OdtoOgAdNRqWTBT8M9l8MngYuY86XQT1YPI31BDkFLys9SSO6b1yl2
kcwFfw9E3ChjCPPoFv75xF9HFJM5KFd/rquEPMmSHZJAlILMv8zDnmYJX6qNRcUIuR3n
VtMwM9ZS9BPrYJzwIMc3/jfLvdBnKOSohD4I4Pjz1yOX7WdRiRhpEhwUm7++ZPrvJf3X
iL9w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793624300; x=1794229100;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=OQFH2hgC0TDM1sRzbEadUUZlJqc+Evd7f3Bf5CeXHcs=;
b=lBJnMvcb/UnyepuJaOjv1MHHj/g2Ex7neVNxV/gH5rRb0sB3E1Oho6o8WajDxem2eR
YAU30bYI91EmafcPiuqMiiujOLDyUtx6JSpPMzK7E5vkQVwcU0FaWouAi3aZMTYTY+o+
gZn0vp9rbHQg6HjdCcrKv1Zw289/GKXnBcBmwUlbL5ykhHIW8kFxtpscmHp5v4ylwY/E
nAhG2zzzvHyA4GCN8T+JfsYM0yvgsmGMSejJWJKhGhz47Xg/HO1nufl3jrpEO3o1emc3
Tzwl4zy2pz5OkPQgdHnHbjI1yvoT66rh/l8rvD4l/kSUuOMgqPqRFQPINJqtHVj4V8w1
8RRQ==
X-Gm-Message-State: APuU4Z8D8lUCoAlH0vxT0F2N/ocspMd17JVDJwTP9umj/VcErFFPuYuC
6XqAfiyRQOFTQSI++tyaFHLuUA3E8fvvujrigTR5phfmdH5Q/OAEmntFKsHoPVS+imiKrS783ut
FnSffRYC8Mgo8AG6bnxpfYy1VWIA8Yxw=
X-Gm-Gg: AYBFou0/+CynYo8twddr0ycS04yC4AxbLYXfW1+IC+G1pbA3chrcE0h+c5OZnPoqcNL
vCZL9Vi1V5B70bpaXbX107+2OOTjL2FSUTwoLA3GAAkFTDwdJjGbL3UnGQ61TDob5mBDFjftt0G
qCisLvN+yl6v8lVvwb7EA5D+OIOXVGQg4MIatBim+kgVAkHGe4ivibX41lzmPXLl7u2ph4VuI4A
wGkpsGhkV0UHVLvcomLm7Qlrc7id/O6HV9GiT3/rYfNTnHirD2tryqdatckSlP+3MwzvK1qNB4T
lKjL2xXc5ZbIZdVJFj8gaBak0sJFw4741I17E9G5vS7K7qjbY2ccWfnXFmorACfnoaJGUSvqRMb
HPIWwJFXH1jQA/YZWS+8fbj1GGCRUEHNAs7aimD5C8cUFwMJW72tEvePtw0yNppr2cosLpgihK5
QTqyg0Tjzm09qN9LdJ1aD38To8MH0=
X-Received: by 2002:a05:690c:a046:b0:8b0:eab2:f502 with SMTP id
00721157ae682-8b2b67992e6mr60153087b3.61.1793624299790; Mon, 02 Nov 2026
04:58:19 -0800 (PST)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <eb689b84-eab8-4289-a48d-64f13853028e@lunn.ch>
X-Gm-Features: AclHuK8H_X0i0D1i4ZuBHXpKubFRHuWttNt6nX4o4KI_nkbsioLW4F8WI5Emr7s
X-Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, toke@toke.dk