* [PATCH] IPV6: fix source address selection
@ 2007-09-12 22:56 Jiri Kosina
2007-09-16 21:49 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Kosina @ 2007-09-12 22:56 UTC (permalink / raw)
To: davem, nhorman; +Cc: netdev, Jiri Bohac, Petr Baudis
From: Jiri Kosina <jkosina@suse.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@suse.cz>
Cc: Petr Baudis <pasky@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.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)) {
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] IPV6: fix source address selection
2007-09-12 22:56 [PATCH] IPV6: fix source address selection Jiri Kosina
@ 2007-09-16 21:49 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-09-16 21:49 UTC (permalink / raw)
To: jkosina; +Cc: nhorman, netdev, jbohac, pasky
From: Jiri Kosina <jkosina@suse.cz>
Date: Thu, 13 Sep 2007 00:56:00 +0200 (CEST)
> From: Jiri Kosina <jkosina@suse.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@suse.cz>
> Cc: Petr Baudis <pasky@suse.cz>
> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Excellent catch Jiri.
I'll apply this and push to -stable as well.
Thanks a lot!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-16 21:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-12 22:56 [PATCH] IPV6: fix source address selection Jiri Kosina
2007-09-16 21:49 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox