[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0709130044300.7343@jikos.suse.cz>
Date: Thu, 13 Sep 2007 00:56:00 +0200 (CEST)
From: Jiri Kosina <jkosina@...e.cz>
To: davem@...emloft.net, nhorman@...driver.com
Cc: netdev@...r.kernel.org, Jiri Bohac <jbohac@...e.cz>,
Petr Baudis <pasky@...e.cz>
Subject: [PATCH] IPV6: fix source address selection
From: Jiri Kosina <jkosina@...e.cz>
[PATCH] IPV6: fix source address selection
The commit 95c385 broke proper source address selection for cases in which
there is a address which is makred 'deprecated'. The commit mistakenly
changed ifa->flags to ifa_result->flags (probably copy/paste error from a
few lines above) in the 'Rule 3' address selection code.
The patch below restores the previous RFC-compliant behavior, please
apply.
Cc: Jiri Bohac <jbohac@...e.cz>
Cc: Petr Baudis <pasky@...e.cz>
Signed-off-by: Jiri Kosina <jkosina@...e.cz>
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 91ef3be..45b4c82 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1021,7 +1021,7 @@ int ipv6_dev_get_saddr(struct net_device
hiscore.rule++;
}
if (ipv6_saddr_preferred(score.addr_type) ||
- (((ifa_result->flags &
+ (((ifa->flags &
(IFA_F_DEPRECATED|IFA_F_OPTIMISTIC)) == 0))) {
score.attrs |= IPV6_SADDR_SCORE_PREFERRED;
if (!(hiscore.attrs & IPV6_SADDR_SCORE_PREFERRED)) {
-
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