Re: [Patch net] tcp: reset sk_rx_dst in tcp_disconnect()

2017-07-04 Thread Jamie Bainbridge
On 25 June 2017 at 16:50, Cong Wang wrote: > We have to reset the sk->sk_rx_dst when we disconnect a TCP > connection, because otherwise when we re-connect it this > dst reference is simply overridden in tcp_finish_connect(). > > This fixes a dst leak which leads to a loopback dev refcnt > leak. I

[PATCH] ipv6: check raw payload size correctly in ioctl

2017-04-25 Thread Jamie Bainbridge
ady correctly set in ip6_input_finish() with pskb_pull(), so use skb->len as it always returns the correct result for both linear and paged data. Signed-off-by: Jamie Bainbridge --- net/ipv6/raw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c

Re: [PATCH 2/2] ipv6: don't deliver packets with zero length to raw sockets

2017-04-22 Thread Jamie Bainbridge
On Sat, Apr 22, 2017 at 12:53 AM, David Miller wrote: > From: Jamie Bainbridge > Date: Fri, 21 Apr 2017 21:18:00 +1000 > >> I cannot see the use in delivering a skb with zero bytes after the >> network header to a raw socket. > > Then it cannot be used to look at zer

Re: [PATCH 2/2] ipv6: don't deliver packets with zero length to raw sockets

2017-04-21 Thread Jamie Bainbridge
Hi Sabrina, On Fri, Apr 21, 2017 at 8:01 PM, Sabrina Dubroca wrote: > Hi Jamie, > > 2017-04-21, 13:58:44 +1000, Jamie Bainbridge wrote: >> IPv6 assumes there is data after the network header and blindly delivers >> skbs to raw sockets without checking the presence o

[PATCH 2/2] ipv6: don't deliver packets with zero length to raw sockets

2017-04-20 Thread Jamie Bainbridge
len is already correctly set in ip6_input_finish() with pskb_pull() so check this length before delivering zero data to raw sockets. Signed-off-by: Jamie Bainbridge --- net/ipv6/raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c in

[PATCH 1/2] ipv6: check raw payload size correctly in ioctl

2017-04-20 Thread Jamie Bainbridge
in ip6_input_finish() with pskb_pull(), so use skb->len as it always returns the correct result for both linear and paged data. Signed-off-by: Jamie Bainbridge --- net/ipv6/raw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c