Re: Connect hangs for a while before returns -1 with ECONNREFUSED on 3.2 for loopback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Le samedi 04 février 2012 à 17:48 +0200, Julian Anastasov a écrit :

> 	flowi4_tos is missing from this list but anyways,
> it looks wrong because __ip_route_output_key returns data
> in saddr and daddr, such change will break source address
> autoselection and destination address autoselection. That is
> what ip_route_connect is trying to do. May be
> ip_route_connect should be fixed instead?
> 

Thanks Julian, this is indeed tricky.

I tested successfully the following patch, maybe we also need
to restore tos bits ?

diff --git a/include/net/route.h b/include/net/route.h
index 91855d1..f27a82d 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -272,7 +272,9 @@ static inline struct rtable *ip_route_connect(struct flowi4 *fl4,
 		ip_rt_put(rt);
 	}
 	security_sk_classify_flow(sk, flowi4_to_flowi(fl4));
-	return ip_route_output_flow(net, fl4, sk);
+	rt = ip_route_output_flow(net, fl4, sk);
+	fl4->flowi4_oif = oif;
+	return rt;
 }
 
 static inline struct rtable *ip_route_newports(struct flowi4 *fl4, struct rtable *rt,


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux Kernel Discussion]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux Bluetooth Networking]     [Linux Networking Users]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Photo]     [Singles Social Networking]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Free Dating]

Add to Google Powered by Linux