[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e878cb1d-82ab-d7e6-b375-970ff0926ce1@cogentembedded.com>
Date: Mon, 29 Aug 2016 19:50:42 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: 吉藤英明 <hideaki.yoshifuji@...aclelinux.com>
Cc: Nicolas Dichtel <nicolas.dichtel@...nd.com>,
David Miller <davem@...emloft.net>,
network dev <netdev@...r.kernel.org>
Subject: Re: [PATCH net 1/2] ipv6: add missing netconf notif when 'all' is
updated
On 08/29/2016 05:13 PM, 吉藤英明 wrote:
>>> The 'default' value was not advertised.
>>>
>>> Fixes: f3a1bfb11ccb ("rtnl/ipv6: use netconf msg to advertise forwarding
>>> status")
>>> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@...nd.com>
>>> ---
>>> net/ipv6/addrconf.c | 7 +++++++
>>> 1 file changed, 7 insertions(+)
>>>
>>> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
>>> index f418d2eaeddd..299f0656e87f 100644
>>> --- a/net/ipv6/addrconf.c
>>> +++ b/net/ipv6/addrconf.c
>>> @@ -778,7 +778,14 @@ static int addrconf_fixup_forwarding(struct ctl_table
>>> *table, int *p, int newf)
>>> }
>>>
>>> if (p == &net->ipv6.devconf_all->forwarding) {
>>> + int old_dftl = net->ipv6.devconf_dflt->forwarding;
>>> +
>>> net->ipv6.devconf_dflt->forwarding = newf;
>>> + if ((!newf) ^ (!old_dftl))
>>
>>
>> IIUC, !'s are not necessary here (and more so the parens around them).
>> And perhaps ^ can be changed to != for clarity...
>
> No, it will break.
Well, if those variables are actually bit masks, ! seem to be needed
indeed. But ^ can be replaced by != anyway.
> --yoshfuji
MBR, Sergei
Powered by blists - more mailing lists