Le vendredi 03 février 2012 à 16:43 -0500, Shawn Lu a écrit :
[shawn Lu] ok. Tcp socket is bind to device using SO_BINDTODEVICE to
Limit traffic to specifc interface. Sometime, it may not have a valid
Source address to get through ip_route_output_key.
Define "Sometime" ?
We have to force the oif only if requested by the socket in this case.
arg.bound_dev_if = sk ? sk->sk_bound_dev_if : 0;
Thats what we do in tcp_v4_send_ack() :
if (oif)
arg.bound_dev_if = oif;