Re: [bpf PATCH v2 1/2] bpf: sockmap, fix crash when ipv6 sock is added

2018-06-12 Thread John Fastabend
On 06/11/2018 04:14 PM, Daniel Borkmann wrote: > Hi John, > > On 06/08/2018 05:06 PM, John Fastabend wrote: >> This fixes a crash where we assign tcp_prot to IPv6 sockets instead >> of tcpv6_prot. >> >> Previously we overwrote the sk->prot field with tcp_prot even in the >> AF_INET6 case. This pat

Re: [bpf PATCH v2 1/2] bpf: sockmap, fix crash when ipv6 sock is added

2018-06-11 Thread Daniel Borkmann
Hi John, On 06/08/2018 05:06 PM, John Fastabend wrote: > This fixes a crash where we assign tcp_prot to IPv6 sockets instead > of tcpv6_prot. > > Previously we overwrote the sk->prot field with tcp_prot even in the > AF_INET6 case. This patch ensures the correct tcp_prot and tcpv6_prot > are used

[bpf PATCH v2 1/2] bpf: sockmap, fix crash when ipv6 sock is added

2018-06-08 Thread John Fastabend
This fixes a crash where we assign tcp_prot to IPv6 sockets instead of tcpv6_prot. Previously we overwrote the sk->prot field with tcp_prot even in the AF_INET6 case. This patch ensures the correct tcp_prot and tcpv6_prot are used. Further, only allow ESTABLISHED connections to join the map per no