All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipv6: fix incorrect unregistration of sysctl when last ip deleted
@ 2011-04-27 23:12 John Myers
  2011-04-29 20:45 ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: John Myers @ 2011-04-27 23:12 UTC (permalink / raw)
  To: David S. Miller, Alexey Kuznetsov, Pekka Savola (ipv6),
	James Morris, Hideaki YOSHIFUJI, Patrick McHardy, netdev,
	linux-kernel

When the last ip address is deleted, the kernel disables IPv6 on the
interface. (Not sure why, but that's beside the point.) The call that
does this is over-aggressive--it indicates the interface is about to
be removed even though that isn't necessarily so.

This causes IPv6 to, among other things, unregister its sysctl
parameters for the interface. Thus, the "accept_ra" and "addrconf"
settings can't be set on the interface until after the interface has
been brought back up, which is too late.

Signed-off-by: John Gardiner Myers <jgmyers@proofpoint.com>
Cc: stable@kernel.org

---

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 1493534..042d0aa 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2215,7 +2215,7 @@ static int inet6_addr_del(struct net *net, int ifindex, struct in6_addr *pfx,
 			   disable IPv6 on this interface.
 			 */
 			if (list_empty(&idev->addr_list))
-				addrconf_ifdown(idev->dev, 1);
+				addrconf_ifdown(idev->dev, 0);
 			return 0;
 		}
 	}

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] ipv6: fix incorrect unregistration of sysctl when last ip deleted
@ 2011-04-27 23:12 John Myers
  0 siblings, 0 replies; 7+ messages in thread
From: John Myers @ 2011-04-27 23:12 UTC (permalink / raw)
  To: David S. Miller, Alexey Kuznetsov, Pekka Savola (ipv6),
	James Morris, Hideaki YOSHIFUJI <yosh

When the last ip address is deleted, the kernel disables IPv6 on the
interface. (Not sure why, but that's beside the point.) The call that
does this is over-aggressive--it indicates the interface is about to
be removed even though that isn't necessarily so.

This causes IPv6 to, among other things, unregister its sysctl
parameters for the interface. Thus, the "accept_ra" and "addrconf"
settings can't be set on the interface until after the interface has
been brought back up, which is too late.

Signed-off-by: John Gardiner Myers <jgmyers@proofpoint.com>
Cc: stable@kernel.org

---

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 1493534..042d0aa 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2215,7 +2215,7 @@ static int inet6_addr_del(struct net *net, int ifindex, struct in6_addr *pfx,
 			   disable IPv6 on this interface.
 			 */
 			if (list_empty(&idev->addr_list))
-				addrconf_ifdown(idev->dev, 1);
+				addrconf_ifdown(idev->dev, 0);
 			return 0;
 		}
 	}

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-05-01  9:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-27 23:12 [PATCH] ipv6: fix incorrect unregistration of sysctl when last ip deleted John Myers
2011-04-29 20:45 ` David Miller
2011-04-29 21:58   ` John Gardiner Myers
2011-04-30  0:07     ` Alexey Kuznetsov
2011-05-01  9:59       ` Eric W. Biederman
2011-04-30  3:47     ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2011-04-27 23:12 John Myers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.