Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ae5f983 authored by Jiri Kosina's avatar Jiri Kosina Committed by David S. Miller
Browse files

[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 restores the previous RFC-compliant behavior.

Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2a0c6c98
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1021,7 +1021,7 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev,
				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)) {