[kernel] r15255 - in dists/lenny/linux-2.6/debian/patches: bugfix/all series
Moritz Muehlenhoff
jmm at alioth.debian.org
Sun Feb 21 22:18:35 UTC 2010
Author: jmm
Date: Sun Feb 21 22:18:32 2010
New Revision: 15255
Log:
#508460 for Lenny
Added:
dists/lenny/linux-2.6/debian/patches/bugfix/all/ipv6-fix-pending-dad.patch
Modified:
dists/lenny/linux-2.6/debian/patches/series/22
Added: dists/lenny/linux-2.6/debian/patches/bugfix/all/ipv6-fix-pending-dad.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/bugfix/all/ipv6-fix-pending-dad.patch Sun Feb 21 22:18:32 2010 (r15255)
@@ -0,0 +1,68 @@
+From: Benjamin Thery <benjamin.thery at bull.net>
+Date: Wed, 5 Nov 2008 09:43:57 +0000 (-0800)
+Subject: ipv6: fix run pending DAD when interface becomes ready
+X-Git-Tag: v2.6.28-rc4~22^2~4
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=e3ec6cfc260e2322834e200c2fa349cdf104fd13
+
+ipv6: fix run pending DAD when interface becomes ready
+
+With some net devices types, an IPv6 address configured while the
+interface was down can stay 'tentative' forever, even after the interface
+is set up. In some case, pending IPv6 DADs are not executed when the
+device becomes ready.
+
+I observed this while doing some tests with kvm. If I assign an IPv6
+address to my interface eth0 (kvm driver rtl8139) when it is still down
+then the address is flagged tentative (IFA_F_TENTATIVE). Then, I set
+eth0 up, and to my surprise, the address stays 'tentative', no DAD is
+executed and the address can't be pinged.
+
+I also observed the same behaviour, without kvm, with virtual interfaces
+types macvlan and veth.
+
+Some easy steps to reproduce the issue with macvlan:
+
+1. ip link add link eth0 type macvlan
+2. ip -6 addr add 2003::ab32/64 dev macvlan0
+3. ip addr show dev macvlan0
+ ...
+ inet6 2003::ab32/64 scope global tentative
+ ...
+4. ip link set macvlan0 up
+5. ip addr show dev macvlan0
+ ...
+ inet6 2003::ab32/64 scope global tentative
+ ...
+ Address is still tentative
+
+I think there's a bug in net/ipv6/addrconf.c, addrconf_notify():
+addrconf_dad_run() is not always run when the interface is flagged IF_READY.
+Currently it is only run when receiving NETDEV_CHANGE event. Looks like
+some (virtual) devices doesn't send this event when becoming up.
+
+For both NETDEV_UP and NETDEV_CHANGE events, when the interface becomes
+ready, run_pending should be set to 1. Patch below.
+
+'run_pending = 1' could be moved below the if/else block but it makes
+the code less readable.
+
+Signed-off-by: Benjamin Thery <benjamin.thery at bull.net>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+
+diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
+index eea9542..d9da5eb 100644
+--- a/net/ipv6/addrconf.c
++++ b/net/ipv6/addrconf.c
+@@ -2483,8 +2483,10 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
+ if (!idev && dev->mtu >= IPV6_MIN_MTU)
+ idev = ipv6_add_dev(dev);
+
+- if (idev)
++ if (idev) {
+ idev->if_flags |= IF_READY;
++ run_pending = 1;
++ }
+ } else {
+ if (!addrconf_qdisc_ok(dev)) {
+ /* device is still not ready. */
Modified: dists/lenny/linux-2.6/debian/patches/series/22
==============================================================================
--- dists/lenny/linux-2.6/debian/patches/series/22 Sun Feb 21 22:15:41 2010 (r15254)
+++ dists/lenny/linux-2.6/debian/patches/series/22 Sun Feb 21 22:18:32 2010 (r15255)
@@ -21,3 +21,6 @@
+ features/all/add-be2net.patch
+ bugfix/x86/fix-vmi-clocksource.patch
+ bugfix/all/yealink-reliably-kill-urbs.patch
++ bugfix/all/ipv6-fix-pending-dad.patch
+
+
More information about the Kernel-svn-changes
mailing list