Article View: linux.kernel.netdev
Article #15286Re: [PATCH net-next] ipv6: reset all.force_forwarding when disabling all.forwarding
From: Nicolas Dichtel
Date: Thu, 12 Nov 2026 16:26
Date: Thu, 12 Nov 2026 16:26
45 lines
12838 bytes
12838 bytes
Le 09/11/2026 ร 16:53, Gabriel Goller a รฉcritย :
> Disabling all.forwarding resets force_forwarding on every interface, but
> leaves all.force_forwarding set:
>
> # sysctl -wq net.ipv6.conf.all.forwarding=1
> # sysctl -wq net.ipv6.conf.all.force_forwarding=1
> # sysctl -wq net.ipv6.conf.all.forwarding=0
> # sysctl net.ipv6.conf.dummy1.force_forwarding
> net.ipv6.conf.dummy1.force_forwarding = 0
> # sysctl net.ipv6.conf.all.force_forwarding
> net.ipv6.conf.all.force_forwarding = 1
>
> Writing 1 to all.force_forwarding afterwards is ignored because the
> value did not change, so the interfaces are not re-enabled.
>
> Reset all.force_forwarding too and notify netconf listeners.
>
> Suggested-by: Ido Schimmel <idosch@nvidia.com>
> Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
> ---
> net/ipv6/addrconf.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index d9d13e78bf13..9007a58039e6 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -905,6 +905,14 @@ static int addrconf_fixup_forwarding(const struct ctl_table *table, int *p, int
> net->ipv6.devconf_dflt);
>
> addrconf_forward_change(net, newf);
> + /* Disabling all.forwarding also resets all.force_forwarding */
> + if (newf == 0 && net->ipv6.devconf_all->force_forwarding) {
> + WRITE_ONCE(net->ipv6.devconf_all->force_forwarding, 0);
> + inet6_netconf_notify_devconf(net, RTM_NEWNETCONF,
> + NETCONFA_FORCE_FORWARDING,
> + NETCONFA_IFINDEX_ALL,
> + net->ipv6.devconf_all);
> + }
> if ((!newf) ^ (!old))
> inet6_netconf_notify_devconf(net, RTM_NEWNETCONF,
> NETCONFA_FORWARDING,
Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Technical Details
Message-ID:
<8db41fd4-6c07-4f15-9cd9-5525913968ae@6wind.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362006-linux-kernel-netdev=dewy.ruReferences:
<20261109-ipv6_reset_all-v1-1-815dfd508246@proxmox.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362006-linux-kernel-netdev=dewy.ru
From: nicolas.dichtel@6wind.com (Nicolas Dichtel)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next] ipv6: reset all.force_forwarding when disabling
all.forwarding
Date: Thu, 12 Nov 2026 17:26:38 +0100
Organization: Usenet Network
Message-ID: <8db41fd4-6c07-4f15-9cd9-5525913968ae@6wind.com>
References: <20261109-ipv6_reset_all-v1-1-815dfd508246@proxmox.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="1127044"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:9DcRla+zYY4s9YjXCY+8zt+j3Ik= sha256:cv/dlBDb3d33zNpZFoSRlfzB2Ho88LoD6InOHqym0bY=
sha1:cuSti+2ZZdqM+XTEEKW5x7N2L8o= sha256:Z50pZZ1zkd5Ofd0al+S8XWHOayMCY9bY7Ns7SZnZIw4=
Content-Language: en-US
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 94D8C1142F1; Thu, 12 Nov 2026 19:39:20 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
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=6wind.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 m46gUdD1tKL3;
Thu, 12 Nov 2026 19:39:17 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-362006-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=6wind.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 019481142F0; Thu, 12 Nov 2026 19:39:08 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id 93E2AE9D84; Thu, 12 Nov 2026 16:26:48 +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=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1794500803;
b=SZAWv21HIAbF6IXdiCZLv4gID26B+tbdVBVcKbykjF274qR6veIrCw7khnTrGmzcPCIo
JRux+wZySXaS66SiZj/RplJQOmfdOSyZOi7OdbaeZbyvBLOTkrrcAEswarDp+EtMpTdlC
XCS1iM1m8gOUEi06JFBBcnrCzMHGsBSM6VBolo+1dhhOTndF7VM9ukDGERWUbp53SmbG4
noDYxccIAAGMpEWWIizt9VBW15pZY3NQSf+sEXpRkMUwVzTL8NDBwwcQSiycrLptCOVDF
XSL4N1OiEOisXWuKhUv577E+D7YDpP/KIr8VJherldHdXZpnstl3mMfmaFggcm1gNLQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794500803;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:Message-ID:Date:X-Mailing-List:List-Id:List-Post:List-Help:
List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
User-Agent:Reply-To:Subject:To:Cc:References:From:Content-Language:
Organization:In-Reply-To:Content-Type:Content-Transfer-Encoding;
bh=Ug3gxgTRAmLwJZ9jlDeZvtL+FD9HT2QhKSrhIo50A4o=;
b=tpffNLVh70pD3dVQptHAYO9M+Cme466ZNTXY1uT5Tsvnzyo00THQHSuHNqu7JAUB9BSQ
PS3AplV8FYZOEWAqkB+58NHvuKH2tnxf0dbwgQp+kn0YVDYwUcx5bZrs7mnareKaUq3BD
Qb4u8Ii2t17zNBTNnJ9u+zxb2O+8wNNF/DaTPKxc2F9UnnjSRR5rzZ3R1vqDUwbnY+++0
KT1Gr0IKCxdp5g8SLz90/3JyxNDfLodpq5eZlsl/PeVGx/DfiwrgpN7+1QT7o5pB4TqSz
7Z49OgsE6w/50VAbyLxczExsMFBoKeH3x094xvumEfic5eLOao1qkYzSCk1mtUmbAAg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=6wind.com header.i=@6wind.com header.a=rsa-sha256 header.s=google header.b=bKL3u6dI;
dmarc=pass header.from=6wind.com;
spf=pass smtp.mailfrom=6wind.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 00ADF606A337;
Thu, 12 Nov 2026 16:26:43 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=6wind.com header.i=@6wind.com header.a=rsa-sha256 header.s=google header.b=bKL3u6dI
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.45
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1794500802;
b=yc9woyyx4aXGXi0DlvE4PzhRzYN2eIpFA7j0lfHJqP/vPLx3zc2T146ucL5L4eOw3ocA
T2feVtzg9ipfrjMhKWoLPzMeXRCZkuBXvHlGLycABF2z2dpZep2VOiMMGdmLhMhSw8Ipr
6Y95q3vwNyEhC5nJl4RFZBBa46Slh6VgJrvrjw1RUVzXEKD6glH8aeI9FZQ690Kd+jgfQ
XjeQxKA1kl2L1cBIyT7KXitzjXm5xu19zx+zJ2+emNhgwDqB8gIf66InQAigvgLPfh/DL
KI3BhVmg1iOnysAI1r11q9dn8ABkKTA9gEKjsxSPBtv+TNV4XJRKYUQLoWmr19Zf3/w==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794500802;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Message-ID:Date:
MIME-Version:User-Agent:Reply-To:Subject:To:Cc:References:From:
Content-Language:Organization:In-Reply-To:Content-Type:
Content-Transfer-Encoding;
bh=Ug3gxgTRAmLwJZ9jlDeZvtL+FD9HT2QhKSrhIo50A4o=;
b=10rtHRONI/HxBOZaDp4hSW3vkkJ1RyDfcQwNZwwSiBYLf0BpoqVatoWjYK5bef5pFSwO
NZUeqNvQ+y3DT3JulRQxzXOfP70XnXzNM+Qn6reswZro1JmNJ2sDnejrqb1ecvT+kGfv1
lngKMVocdtGjghxND1PCswjIEhADm1ctuhnc8SdJNf16OM0bXwXaViS44rkXs7URzi41A
beicG5Iyb87EUVxlsJfRhB98ZuZXWmi3nIa9EViRA9z1+57IlZQzpTwTFOKRaq6F6a0u9
0oF9fXkVjebSNCV9jTcwxHA1OeQrUSAVp7AYj8SXwzxg9jwHOMBuM0VYfIeFd+9A1MQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=6wind.com;
spf=pass smtp.mailfrom=6wind.com;
dkim=pass header.d=6wind.com header.i=@6wind.com header.a=rsa-sha256 header.s=google header.b=bKL3u6dI;
arc=none smtp.remote-ip=209.85.218.45
X-Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45])
(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 BA61B606A331
for <netdev@vger.kernel.org>; Thu, 12 Nov 2026 16:26:41 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BA61B606A331
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=6wind.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=6wind.com
X-Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-c50737c64c8so20094066b.1
for <netdev@vger.kernel.org>; Thu, 12 Nov 2026 08:26:41 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=6wind.com; s=google; t=1794500800; x=1795105600; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:in-reply-to:organization
:content-language:from:references:cc:to:subject:reply-to:user-agent
:mime-version:date:message-id:from:to:cc:subject:date:message-id
:reply-to:content-type;
bh=Ug3gxgTRAmLwJZ9jlDeZvtL+FD9HT2QhKSrhIo50A4o=;
b=bKL3u6dIu0++rEZtas/JwemFgjhK543MBrZqIi6nlnUlmVTr84ugl6hhyXAH3LMga6
cCxfIqUlK81TzFbcfollEP13jViCJkS6smiwmRThA36Ie/9iw7M4QmWypzOX2KfhXooA
jyR2S7vjGUhDnpT0Mw2EeZYXGRR6fDJz69jI0yiPdNhCVhZ6r5DJ6O00JcpMZ11IRS9q
R6m6FxzU+QkC01VFl6wxruWB3fUPxWJ5dbkV0TTP2fuxRth6nPAKzcXFbsA6cFKBFRT8
xRc37e9pWeuuJrvKjC3WdIxl5rpcdHJ90QP1J9+aNKjsFsoq9o65fslzmGjbUUYwDG3W
5hZg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1794500800; x=1795105600;
h=content-transfer-encoding:content-type:in-reply-to:organization
:content-language:from:references:cc:to:subject:reply-to:user-agent
:mime-version:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to:content-type;
bh=Ug3gxgTRAmLwJZ9jlDeZvtL+FD9HT2QhKSrhIo50A4o=;
b=F0SOqWVgUpcQNY89ZN6AfuoW7DIwr9BkmoXC+QJAVhE1Ccvpe+ZOSUXxYi+cbv0XGy
XlJzYBPl8ad0bIReFYXi+kAxluWPGJPzOi8yTP/NwXXFkG/a4ZtnNV00wvh3RXbhBC6A
F8lhqr2Vv2WDV70lgD6JpbxkBxKqDo5CFQnsk+9jzhkZGdtrq/OZNZe7L+9F4Dk11bYY
mXjvxHy/eZtlgKdRR4hqttUYbLTl03xj9N19ud1FO47LJtxYRUKhB1H+b8U0T0+NejLE
ygfO5wvQ0+qihIpfMlBpEEA27qoq7daL4faDooeva6me3i4N41yX1b4fezuVQ+uzj9Dv
YOyQ==
X-Gm-Message-State: APuU4Z/jaF/VfogkDJW6NWfDMODM+N2AzfvYfywlhcbix+YALQ+iDOt4
exSrjgXkzhR8w6WbFP7sewOzlXHRDH10ok0nER8riSC9MBIagtV2EobrfaRDRIKlO0/5Oxu3kEN
i40UZmhg=
X-Gm-Gg: AYBFou24Z24Atxvd5xyG8sfu/MSgCVbLUGDr5oD0i+3NqEI1jW61Tv/kP0vdR/Sf5Y1
WRM7yVGBKD5e6pF8jOg4xlVMX5+biiRULn2xawKskcd5fkzKyFH/OexE8sAyCmNRyeES+8E5u5T
os31OhPVTDZ1SN9pmbtJVLWnplt6TpOvSxoIE2DpmhRFqStJOm9J9ZTSU35tTuSf7PZz5RrUwsv
+o7O8XHTibBy0pUblsmUo2nOPQXiuE/4Ie4ZEULu3TqsStb7rlz0VpDhKTImB2SkxeZoO+s7Eld
SSxUOdmILVhttcMAsTyYzo3IBe/oj42KdwQUs4HMQJIleiKY9kkvSZy8o2meKnRzAmgiYGO2B12
4bjc34qx2sXtwX2FKjlpOgfJwrlGFIR0WNCZWirKJe7veSGHcBOLyxtDy9AyKlEXMAPBc2r+lAJ
nLn06AdPcfHOF72SoeBnD7R32R1ni4ubpscH/VyAH/e/Toql/1TGX30YlvM85X9mpHdWsApziUV
xM8kS1wXdebrKLR785TJBS53UDNZ4Laj4kJBbreWk7svmXh87YLcELLGcNp/rRiT2bK8/Z60Et9
IdqW7+wPTos0ovxu3vpES9BuZ/4rGeBJfeo/AK5dgHBObbb857zXzudZ7LHOs5q4U9tJI+mNN5r
NZMU67zMbLCijqX4Um73q1wdxthGp
X-Received: by 2002:a17:907:60a:b0:c46:ae89:cd3c with SMTP id a640c23a62f3a-c5066966d74mr520801966b.1.1794500799989;
Thu, 12 Nov 2026 08:26:39 -0800 (PST)
X-Received: from ?IPV6:2a01:e0a:ab7:2110:6a1d:efff:fe52:1959? ([2a01:e0a:ab7:2110:6a1d:efff:fe52:1959])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-49c5f782396sm117814f8f.24.2026.11.12.08.26.39
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Thu, 12 Nov 2026 08:26:39 -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-User-Agent: Mozilla Thunderbird
X-Reply-To: nicolas.dichtel@6wind.com
X-Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
X-Organization: 6WIND
X-In-Reply-To: <20261109-ipv6_reset_all-v1-1-815dfd508246@proxmox.com>