[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bes2ehifwb25xwbxg6dog27hi63vzn2phnhtiibed3wgazjpms@cwcrjo3ky7xq>
Date: Thu, 3 Jul 2025 13:05:11 +0200
From: Gabriel Goller <g.goller@...xmox.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Nicolas Dichtel <nicolas.dichtel@...nd.com>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
Jonathan Corbet <corbet@....net>, David Ahern <dsahern@...nel.org>, netdev@...r.kernel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] ipv6: add `force_forwarding` sysctl to enable
per-interface forwarding
On 02.07.2025 09:10, Jakub Kicinski wrote:
>On Wed, 2 Jul 2025 17:14:42 +0200 Nicolas Dichtel wrote:
>> > Should we invert the polarity? It appears that the condition below only
>> > let's this setting _disable_ forwarding. IMO calling it "force" suggests
>> > to the user that it will force it to be enabled.
>> Not sure to follow you. When force_forwarding is set to 1 the forwarding is
>> always enabled.
>>
>> sysctl | all.forwarding | iface.force_forwarding | packet processing from iface
>> | 0 | 0 | no forward
>> | 0 | 1 | forward
>> | 1 | 0 | forward
>> | 1 | 1 | forward
>
>Ugh, I can't read comparisons to zero.
>Let's switch to more sane logic:
>
> if (idev && !READ_ONCE(idev->cnf.force_forwarding) &&
> !READ_ONCE(net->ipv6.devconf_all->forwarding))
Agree!
Thanks for the review.
Powered by blists - more mailing lists