๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #15185

Re: [PATCH net-next] ipv6: reset all.force_forwarding when disabling all.forwarding

#15185
From: Gabriel Goller
Date: Thu, 12 Nov 2026 13:43
77 lines
10719 bytes
On 10.11.2026 18:34, Nicolas Dichtel wrote:
> 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>
> 
> There is the same effect if an interface entry is reset:
> 
> $ sysctl -wq net.ipv6.conf.all.force_forwarding=1
> $ sysctl net.ipv6.conf.ntfp1.force_forwarding net.ipv6.conf.all.force_forwarding
> net.ipv6.conf.ntfp1.force_forwarding = 1
> net.ipv6.conf.all.force_forwarding = 1
> $ sysctl -wq net.ipv6.conf.ntfp1.force_forwarding=0
> $ sysctl net.ipv6.conf.ntfp1.force_forwarding net.ipv6.conf.all.force_forwarding
> net.ipv6.conf.ntfp1.force_forwarding = 0
> net.ipv6.conf.all.force_forwarding = 1
> $ sysctl -wq net.ipv6.conf.all.force_forwarding=1
> $ sysctl net.ipv6.conf.ntfp1.force_forwarding net.ipv6.conf.all.force_forwarding
> net.ipv6.conf.ntfp1.force_forwarding = 0
> net.ipv6.conf.all.force_forwarding = 1
> 
> Maybe the new value should be applied whatever the old value was for the 'all'
> entry (like for net.ipv6.conf.all.forwarding).
> 
> Note that, it is the same for ipv4 forwarding:
> 
> $ sysctl -wq net.ipv4.conf.all.forwarding=1
> $ sysctl net.ipv4.conf.all.forwarding net.ipv4.conf.ntfp1.forwarding
> net.ipv4.conf.all.forwarding = 1
> net.ipv4.conf.ntfp1.forwarding = 1
> $ sysctl -wq net.ipv4.conf.ntfp1.forwarding=0
> $ sysctl net.ipv4.conf.all.forwarding net.ipv4.conf.ntfp1.forwarding
> net.ipv4.conf.all.forwarding = 1
> net.ipv4.conf.ntfp1.forwarding = 0
> $ sysctl -wq net.ipv4.conf.all.forwarding=1
> $ sysctl net.ipv4.conf.all.forwarding net.ipv4.conf.ntfp1.forwarding
> net.ipv4.conf.all.forwarding = 1
> net.ipv4.conf.ntfp1.forwarding = 0
> 
> but not for ipv6 forwarding:
> $ sysctl -wq net.ipv6.conf.all.forwarding=1
> $ sysctl net.ipv6.conf.all.forwarding net.ipv6.conf.ntfp1.forwarding
> net.ipv6.conf.all.forwarding = 1
> net.ipv6.conf.ntfp1.forwarding = 1
> $ sysctl -wq net.ipv6.conf.ntfp1.forwarding=0
> $ sysctl net.ipv6.conf.all.forwarding net.ipv6.conf.ntfp1.forwarding
> net.ipv6.conf.all.forwarding = 1
> net.ipv6.conf.ntfp1.forwarding = 0
> $ sysctl -wq net.ipv6.conf.all.forwarding=1
> $ sysctl net.ipv6.conf.all.forwarding net.ipv6.conf.ntfp1.forwarding
> net.ipv6.conf.all.forwarding = 1
> net.ipv6.conf.ntfp1.forwarding = 1

Makes sense, aligned the behavior to ipv6 forwarding with this patch:
https://lore.kernel.org/all/20261112-ipv6_always_apply-v1-1-8df846631005@proxmox.com/

This patch is still relevant.

Thanks for the review.

Gabriel
Technical Details
Message-ID: <avW_Yn2W7tSHTMaq@luna.proxmox.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-361898-linux-kernel-netdev=dewy.ru
References: <20261109-ipv6_reset_all-v1-1-815dfd508246@proxmox.com> <1eb85d22-7d2b-460c-82f6-2af15a4875dc@6wind.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-361898-linux-kernel-netdev=dewy.ru
From: g.goller@proxmox.com (Gabriel Goller)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next] ipv6: reset all.force_forwarding when disabling all.forwarding
Date: Thu, 12 Nov 2026 14:43:41 +0100
Organization: Usenet Network
Message-ID: <avW_Yn2W7tSHTMaq@luna.proxmox.com>
References: <20261109-ipv6_reset_all-v1-1-815dfd508246@proxmox.com> <1eb85d22-7d2b-460c-82f6-2af15a4875dc@6wind.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network; logging-data="1100017"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:VCTrCmW0UGpYjF+fCcNb4hjgEkg= sha256:0KAYquxC5CFMS+FQK3JbO4Dw3OsgLz53lD0G596jguo= sha1:lPIoALo4sgVzqJrV+HWqFW8T9YI= sha256:5fWLvHxx4d2mgXc8TorFXtoGfQhvhx14h1ZOsLuq9IM=
Content-Disposition: inline
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 5E2ED114275; Thu, 12 Nov 2026 16:54:38 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.951
X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=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-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 1bADQVp0Gh1e; Thu, 12 Nov 2026 16:54:31 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-361898-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=proxmox.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 608FC114273; Thu, 12 Nov 2026 16:54:27 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 87DCDA2A67; Thu, 12 Nov 2026 13:43:51 +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=1794491026; b=d9OUkMC2aPrCW3i5B7Ph3C55RGH4wZA6zc6XEA6Ss+C1jGyk87XsMFIeuSauULiEv1Ml zk9RErDYa6mvbZ2ScYc3ctIjz+bytNhUAJhbhy2fJ/KRHznZTaN7rXK2kHHnQXsqvU4XP WLAwlw1qzQ+V66BM/t+la9+WLihiZGJnQ7n3wriV+HANlld/y8HHIcpOgUIE/bIVoGnKK ytOVI1SBP0Ddl0OpHRaqGchuA5ZncsxLkijyUFS89nNVW9GYMh74eoq026qa80fYT8BZL Ge6xRJCno18N8SZEVU8lhPoEkKBVU3CGMpqRsf4yXGRn8NPtJs/KDHwPAwWQNBYL2xQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794491026; h=X-Original-To:Received:DMARC-Filter:Received:Date:From:To:Cc:Subject: Message-ID:References:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Type:Content-Disposition:Content-Transfer-Encoding: In-Reply-To:User-Agent:X-Bm-Milter-Handled:X-Bm-Transport-Timestamp; bh=NRCmlz9UIpzLSIl8G/BYxNYMUmX8i/GH+eW+zCSkzcA=; b=3LXzV5N6r+OgNMN9hgRWj8WZnAfeudmErfa+U05kf7AIaCbVlfL4ej8nzehtAjzvfiPI ZPDP0yf6KNBRy6+IGzGiV5bOfc3reij6fXPdxX5O3QYSYsVTJ+RXYMGNxki3W82J/1e5G p9TfTSyyXSrkAh5xEJPjkubUt6nZCMAqGP8OocHSLlQvBpsiixZrnP+9qRC3wCMx7YK8Q 3+Ecnw4btXuV3kL28/KwwoKSSH0PfUaxa+R5U2cPlmpGsP70tm67KECgO7TMqBmoiALCd sgMtYWwRfhBNIlc8YE77uajHAOaNRo22pn8OLIKEaElWSuE91Vh66AfThX4J0EF7Vag==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none header.from=proxmox.com; spf=pass smtp.mailfrom=proxmox.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 9DA29606A335; Thu, 12 Nov 2026 13:43:46 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=94.136.29.106
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794491026; b=jqtZsua4egKE+dT3mC7DNODJvk+HAioXMUt3BLwZtJOciyTDXQtY16NQhBhgVXWEOqLh rw8jyeAzxJEsYVLDrlHII2mugBtb2q/A4Zp3aWYmYSFuecnfO8mkARgu1oK6T45LEuYS8 6gqc0WTymI7nfoydjV1Yx9pNJ/lOj6GSzFA50wAzgdctVHw84gLIm28UtkvQq5rWVKtql SawwRd3wVi6FvYTCIA7jsbyIg0qNqrr26zJpCkwSxN+W8Jm3bCss+myZxJJslXUBWp3jl 5FZInMjQ5Rt/Sjmlh1VYy+hvgKPd7IXttm2eiUk+b+viyeqXrjJJ0C3wLzZ7mFgsKZg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794491026; h=DMARC-Filter:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To:User-Agent:X-Bm-Milter-Handled: X-Bm-Transport-Timestamp; bh=NRCmlz9UIpzLSIl8G/BYxNYMUmX8i/GH+eW+zCSkzcA=; b=HeOcA9DHEzlIVTH6ihCTpNyoRH9g5JlRL3xM20PIA6PZoUxliHiDQrQwub5RhjeX48qN fJmjy5IhzxxesOWjWheeKM7WF+3j+JqjY7JmW5+OpTEdIU1dLVC/q9X+s7qVIWjAEZZO7 +TLiBCmbyBAcF7vJlitv3vGo1sw79JZhlbosXxP1Qj4JaFjZgaXFRKPwWHXrQ10I752ZC iqpIRsi512K0Kb/shQk5G72cYcLTbqw7lFJcfAIkWXmXEaPKFWf+gr9Ywni7hFsA5VHZL wnEmraRWrxLBJ1wuGR1nD4Ijswl1DUWzCRZPIf5eJljXhIrm5Fq0tIESuKREw1EASPQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=proxmox.com; spf=pass smtp.mailfrom=proxmox.com; arc=none smtp.remote-ip=94.136.29.106
X-Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 860BD606A31C; Thu, 12 Nov 2026 13:43:45 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 860BD606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=proxmox.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proxmox.com
X-Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id DC04746C7C; Thu, 12 Nov 2026 14:43:43 +0100 (CET)
X-Cc: David Ahern <dsahern@kernel.org>, Ido Schimmel <idosch@nvidia.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org
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: <1eb85d22-7d2b-460c-82f6-2af15a4875dc@6wind.com>
X-User-Agent: NeoMutt/20260504
X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2
X-Bm-Transport-Timestamp: 1794491023021