Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-27 Thread Cyrill Gorcunov
On Mon, Sep 26, 2016 at 07:54:37PM -0600, David Ahern wrote: > On 9/26/16 4:38 PM, Cyrill Gorcunov wrote: > > Something like > > > > Index: linux-ml.git/include/uapi/linux/inet_diag.h > > === > > --- linux-ml.git.orig/include/uapi/lin

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-26 Thread David Ahern
On 9/26/16 4:38 PM, Cyrill Gorcunov wrote: > Something like > > Index: linux-ml.git/include/uapi/linux/inet_diag.h > === > --- linux-ml.git.orig/include/uapi/linux/inet_diag.h2016-09-11 > 20:56:18.191584145 +0300 > +++ linux-ml.g

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-26 Thread Cyrill Gorcunov
On Wed, Sep 21, 2016 at 12:13:43AM +0300, Cyrill Gorcunov wrote: > On Fri, Sep 16, 2016 at 11:07:22PM +0300, Cyrill Gorcunov wrote: > > > It may well be a ss bug / problem. As I mentioned I am always seeing 255 > > > for the protocol which > > > > It is rather not addressed in ss. I mean, look, w

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-20 Thread Cyrill Gorcunov
On Fri, Sep 16, 2016 at 11:07:22PM +0300, Cyrill Gorcunov wrote: > > It may well be a ss bug / problem. As I mentioned I am always seeing 255 > > for the protocol which > > It is rather not addressed in ss. I mean, look, when we send out a diag packet > the kernel look ups for a handler, which fo

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Fri, Sep 16, 2016 at 01:55:42PM -0600, David Ahern wrote: > >> Since the display is showing sockets in addition to IPPROTO_RAW: > >> > >> $ ss -A raw > >> State Recv-Q Send-QLocal Address:Port > >> Peer Address:Port > >> UNCONN 0 0

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread David Ahern
On 9/16/16 1:52 PM, Cyrill Gorcunov wrote: > On Fri, Sep 16, 2016 at 01:47:57PM -0600, David Ahern wrote: I'm guessing you passed IPPROTO_RAW (255) as the protocol to socket(). If you pass something else (IPPROTO_ICMP for example) it won't work. >>> >>> True. To support IPPROTO

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Fri, Sep 16, 2016 at 01:47:57PM -0600, David Ahern wrote: > >> > >> I'm guessing you passed IPPROTO_RAW (255) as the protocol to socket(). If > >> you pass something > >> else (IPPROTO_ICMP for example) it won't work. > > > > True. To support IPPROTO_ICMP it need enhancement. I thought start w

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread David Ahern
On 9/16/16 1:39 PM, Cyrill Gorcunov wrote: > On Fri, Sep 16, 2016 at 01:30:28PM -0600, David Ahern wrote: >>> [root@pcs7 iproute2]# misc/ss -A raw >>> State Recv-Q Send-QLocal Address:Port >>>Peer Address:Port

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Fri, Sep 16, 2016 at 01:30:28PM -0600, David Ahern wrote: > > [root@pcs7 iproute2]# misc/ss -A raw > > State Recv-Q Send-QLocal Address:Port > >Peer Address:Port > > > > ESTAB 0 0

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread David Ahern
On 9/16/16 1:00 PM, Cyrill Gorcunov wrote: > I created veth pair and bound raw socket into it. > > [root@pcs7 iproute2]# misc/ss -A raw > State Recv-Q Send-QLocal Address:Port > Peer Address:Port

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Fri, Sep 16, 2016 at 10:06:23AM +0300, Cyrill Gorcunov wrote: > On Thu, Sep 15, 2016 at 05:45:02PM -0600, David Ahern wrote: > > > > > > Try to be selective in the -K , do not kill tcp sockets ? > > > > I am running > >ss -aKw 'dev == red' > > > > to kill raw sockets bound to device named

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-16 Thread Cyrill Gorcunov
On Thu, Sep 15, 2016 at 05:45:02PM -0600, David Ahern wrote: > > > > Try to be selective in the -K , do not kill tcp sockets ? > > I am running >ss -aKw 'dev == red' > > to kill raw sockets bound to device named 'red'. Thanks David, Eric! I'll play with this option today and report the resu

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-15 Thread David Ahern
On 9/15/16 4:48 PM, Eric Dumazet wrote: > On Fri, 2016-09-16 at 00:01 +0300, Cyrill Gorcunov wrote: > >> Here I get kicked off the server. Login back >> >> [cyrill@uranus ~] ssh root@pcs7 >> Last login: Thu Sep 15 23:20:42 2016 from gateway >> [root@pcs7 ~]# cd /home/iproute2/ >> [root@pcs7 iprou

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-15 Thread Eric Dumazet
On Fri, 2016-09-16 at 00:01 +0300, Cyrill Gorcunov wrote: > Here I get kicked off the server. Login back > > [cyrill@uranus ~] ssh root@pcs7 > Last login: Thu Sep 15 23:20:42 2016 from gateway > [root@pcs7 ~]# cd /home/iproute2/ > [root@pcs7 iproute2]# misc/ss -A raw > State Recv-Q Send-Q

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-15 Thread Cyrill Gorcunov
On Thu, Sep 15, 2016 at 02:54:57PM -0600, David Ahern wrote: > On 9/15/16 2:22 PM, Cyrill Gorcunov wrote: > >> ss -K is not working. Socket lookup fails to find a match due to a > >> protocol mismatch. > >> > >> haven't had time to track down why there is a mismatch since the kill uses > >> the s

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-15 Thread David Ahern
On 9/15/16 2:22 PM, Cyrill Gorcunov wrote: >> ss -K is not working. Socket lookup fails to find a match due to a protocol >> mismatch. >> >> haven't had time to track down why there is a mismatch since the kill uses >> the socket returned >> from the dump. Won't have time to come back to this unt

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-15 Thread David Ahern
On 9/15/16 2:36 PM, Eric Dumazet wrote: > On Thu, 2016-09-15 at 14:25 -0600, David Ahern wrote: >> On 9/15/16 2:22 PM, Cyrill Gorcunov wrote: ss -K is not working. Socket lookup fails to find a match due to a protocol mismatch. haven't had time to track down why there is a mism

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-15 Thread Eric Dumazet
On Thu, 2016-09-15 at 14:25 -0600, David Ahern wrote: > On 9/15/16 2:22 PM, Cyrill Gorcunov wrote: > >> ss -K is not working. Socket lookup fails to find a match due to a > >> protocol mismatch. > >> > >> haven't had time to track down why there is a mismatch since the kill uses > >> the socket r

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-15 Thread David Ahern
On 9/15/16 2:22 PM, Cyrill Gorcunov wrote: >> ss -K is not working. Socket lookup fails to find a match due to a protocol >> mismatch. >> >> haven't had time to track down why there is a mismatch since the kill uses >> the socket returned >> from the dump. Won't have time to come back to this unt

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-15 Thread Cyrill Gorcunov
On Thu, Sep 15, 2016 at 01:53:13PM -0600, David Ahern wrote: > On 9/13/16 11:19 AM, Cyrill Gorcunov wrote: > > In criu we are actively using diag interface to collect sockets > > present in the system when dumping applications. And while for > > unix, tcp, udp[lite], packet, netlink it works as exp

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-15 Thread David Ahern
On 9/13/16 11:19 AM, Cyrill Gorcunov wrote: > In criu we are actively using diag interface to collect sockets > present in the system when dumping applications. And while for > unix, tcp, udp[lite], packet, netlink it works as expected, > the raw sockets do not have. Thus add it. > > v2: > - add

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-13 Thread Greg
On Tue, 2016-09-13 at 20:18 +, Rustad, Mark D wrote: > Greg wrote: > > > Someday Linux will be a modern OS that just includes IPV6 and forces a > > config option to NOT have it. > > > > That'll be great. All the IS_ENABLED_(CONFIG_IPV6) scattered everywhere > > is nuts. > > > > > > Better

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-13 Thread Rustad, Mark D
Greg wrote: Someday Linux will be a modern OS that just includes IPV6 and forces a config option to NOT have it. That'll be great. All the IS_ENABLED_(CONFIG_IPV6) scattered everywhere is nuts. Better wait until everyone at least *has* IPv6! I have yet to have IPv6 deployed on any of my

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-13 Thread Greg
On Tue, 2016-09-13 at 20:19 +0300, Cyrill Gorcunov wrote: > In criu we are actively using diag interface to collect sockets > present in the system when dumping applications. And while for > unix, tcp, udp[lite], packet, netlink it works as expected, > the raw sockets do not have. Thus add it. > >

[PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-13 Thread Cyrill Gorcunov
In criu we are actively using diag interface to collect sockets present in the system when dumping applications. And while for unix, tcp, udp[lite], packet, netlink it works as expected, the raw sockets do not have. Thus add it. v2: - add missing sock_put calls in raw_diag_dump_one (by eric.dumaz

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-13 Thread Cyrill Gorcunov
On Tue, Sep 13, 2016 at 11:57:35AM -0400, David Miller wrote: > > > > Thanks for review, David. I updated against net-next. > > Please do not post new versions of patches as replies to existing > discussions. > > Instead, make fresh patch postings to the list. Oh, will do. Sorry for inconvenien

Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-13 Thread David Miller
From: Cyrill Gorcunov Date: Sun, 11 Sep 2016 22:17:15 +0300 > On Sat, Sep 10, 2016 at 04:28:40PM -0600, David Ahern wrote: >> On 9/10/16 4:05 PM, Cyrill Gorcunov wrote: >> > On Sat, Sep 10, 2016 at 10:31:35AM -0600, David Ahern wrote: >> >> >> >> Would you mind adding the destroy capability as we

[PATCH v3] net: ip, diag -- Add diag interface for raw sockets

2016-09-11 Thread Cyrill Gorcunov
eader for ipv6, and > - inet_sk_diag_fill args have changed due to a recent commit Thanks for review, David. I updated against net-next. --- From: Cyrill Gorcunov Subject: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets In criu we are actively using diag interface to collect