Thread (12 messages) flat view 12 messages, 4 authors, 2016-09-02

Re: [PATCH net 1/2] ipv6: add missing netconf notif when 'all' is updated

From: 吉藤英明 <hidden>
Date: 2016-08-29 14:13:31

Hi,

2016-08-29 22:00 GMT+09:00 Sergei Shtylyov [off-list ref]:
Hello.

On 8/29/2016 1:05 PM, Nicolas Dichtel wrote:
quoted
The 'default' value was not advertised.

Fixes: f3a1bfb11ccb ("rtnl/ipv6: use netconf msg to advertise forwarding
status")
Signed-off-by: Nicolas Dichtel <redacted>
---
 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.

--yoshfuji
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help