Skip to contentSkip to conversation

ipv4: Fetch route saddr from flow key in inet_sk_reselect_saddr().

PATCH New David Miller 1 participant 1 message Apr 29, 2011

Subsystems (2)
lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 2/10 ipv4: Fetch route saddr from flow key in inet_sk_reselect_saddr().

Now that output route lookups update the flow with source address selection, we can fetch it from fl4->saddr instead of rt->rt_src

---
 net/ipv4/af_inet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/ipv4/af_inet.c +1 -1
index 963a621..4e73499 100644
@@ -1122,7 +1122,7 @@ static int inet_sk_reselect_saddr(struct sock *sk)
 
 	sk_setup_caps(sk, &rt->dst);
 
-	new_saddr = rt->rt_src;
+	new_saddr = fl4.saddr;
 
 	if (new_saddr == old_saddr)
 		return 0;
Signature · 1 line
1.7.4.5