Re: [PATCH -next] tcp: honour SO_BINDTODEVICE for TW_RST case too

2015-12-21 Thread Florian Westphal
Eric Dumazet wrote: > > - net = sk ? sock_net(sk) : dev_net(skb_dst(skb)->dev); > > + have_full_sk = sk && sk_fullsock(sk); > > + net = have_full_sk ? sock_net(sk) : dev_net(skb_dst(skb)->dev); > > But the net pointer can be derived from timewait the same, not sure why > you changed this pa

Re: [PATCH -next] tcp: honour SO_BINDTODEVICE for TW_RST case too

2015-12-21 Thread Eric Dumazet
On Mon, 2015-12-21 at 17:20 +0100, Florian Westphal wrote: > Hannes points out that when we generate tcp reset for timewait sockets we > pretend we found no socket and pass NULL sk to tcp_vX_send_reset(). > > Make it cope with inet tw sockets and then provide tw sk so RST appears on > correct inte

[PATCH -next] tcp: honour SO_BINDTODEVICE for TW_RST case too

2015-12-21 Thread Florian Westphal
Hannes points out that when we generate tcp reset for timewait sockets we pretend we found no socket and pass NULL sk to tcp_vX_send_reset(). Make it cope with inet tw sockets and then provide tw sk so RST appears on correct interface. Packetdrill test case: // want default route to be used, we r