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 > > === > > ---

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 > +++

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,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2016-09-11 Thread Cyrill Gorcunov
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 <gorcu...@openvz.org> Subject: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets In criu we are actively using diag interf