lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTikC4pv8aOODM2pOg2bKQGL69wivcUU3f9ZziPhe@mail.gmail.com>
Date:	Mon, 25 Oct 2010 19:08:27 -0700
From:	Lorenzo Colitti <lorenzo@...gle.com>
To:	netdev@...r.kernel.org
Subject: [PATCH] ipv6: addrconf: clear IPv6 addresses and routes when losing link

When roaming between different networks (e.g., changing wireless
SSIDs, or plugging in to different wired networks), IPv6 addresses and
routes are not cleared. If the two networks have different IPv6
subnets assigned, the host maintains both the old and new IPv6
addresses and gateways, but only the new ones works. If the host
chooses the wrong source address or gateway, or if the new network
does not have IPv6 but the old one did, IPv6 connections time out,
leading to long delays when trying to connect to IPv6 hosts.

Fix this by ensuring that autoconfigured IPv6 addresses and routes are
purged when link is lost, not only when the interface goes down.

Signed-off-by: Lorenzo Colitti <lorenzo@...gle.com>

--- a/net/ipv6/addrconf.c	2010-10-20 13:30:22.000000000 -0700
+++ b/net/ipv6/addrconf.c	2010-10-25 13:55:15.000000000 -0700
@@ -2524,6 +2524,14 @@
 		} else {
 			if (!addrconf_qdisc_ok(dev)) {
 				/* device is still not ready. */
+				if (idev && (idev->if_flags & IF_READY)) {
+					/* Link lost. Clear addresses and
+					   routes, the device might come back
+					   on a link where they are no longer
+					   valid. */
+					addrconf_ifdown(dev, 0);
+					idev->if_flags &= ~IF_READY;
+				}
 				break;
 			}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ