diff mbox series

[net-next,1/2] ipv6/addrconf: call addrconf_ifdown with consistent values

Message ID 20200731133207.26964-1-florent.fourcot@wifirst.fr
State Accepted
Delegated to: David Miller
Headers show
Series [net-next,1/2] ipv6/addrconf: call addrconf_ifdown with consistent values | expand

Commit Message

Florent Fourcot July 31, 2020, 1:32 p.m. UTC
Second parameter of addrconf_ifdown "how" is used as a boolean
internally. It does not make sense to call it with something different
of 0 or 1.

This value is set to 2 in all git history.

Signed-off-by: Florent Fourcot <florent.fourcot@wifirst.fr>
---
 net/ipv6/addrconf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller Aug. 3, 2020, 10:24 p.m. UTC | #1
From: Florent Fourcot <florent.fourcot@wifirst.fr>
Date: Fri, 31 Jul 2020 15:32:06 +0200

> Second parameter of addrconf_ifdown "how" is used as a boolean
> internally. It does not make sense to call it with something different
> of 0 or 1.
> 
> This value is set to 2 in all git history.
> 
> Signed-off-by: Florent Fourcot <florent.fourcot@wifirst.fr>

The value '2' had a special meaning a very long time ago.
diff mbox series

Patch

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 840bfdb3d7bd..861265fa9d6d 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -7189,7 +7189,7 @@  void addrconf_cleanup(void)
 			continue;
 		addrconf_ifdown(dev, 1);
 	}
-	addrconf_ifdown(init_net.loopback_dev, 2);
+	addrconf_ifdown(init_net.loopback_dev, 1);
 
 	/*
 	 *	Check hash table.