From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965137AbcIPTtF (ORCPT ); Fri, 16 Sep 2016 15:49:05 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:34912 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755337AbcIPTsy (ORCPT ); Fri, 16 Sep 2016 15:48:54 -0400 Subject: Re: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets To: Cyrill Gorcunov References: <20160913171950.GC32643@uranus> <8260ff1f-6907-aed8-caae-68d63a4ad529@cumulusnetworks.com> <20160915202219.GB1867@uranus.lan> <20160915210126.GC1867@uranus.lan> <1473979691.22679.55.camel@edumazet-glaptop3.roam.corp.google.com> <999f0ddb-82e4-ea07-b52a-59d08bc7816d@cumulusnetworks.com> <20160916070623.GD1867@uranus.lan> <20160916190000.GA18116@uranus.lan> <59e12627-7043-fd20-0d68-899ab43b0e71@cumulusnetworks.com> <20160916193927.GB18116@uranus.lan> Cc: Eric Dumazet , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, David Miller , kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, avagin@openvz.org, stephen@networkplumber.org From: David Ahern Message-ID: Date: Fri, 16 Sep 2016 13:47:57 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160916193927.GB18116@uranus.lan> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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-Q Local Address:Port Peer Address:Port >>> ESTAB 0 0 127.0.0.1:ipproto-255 127.0.0.10:ipproto-9090 >>> UNCONN 0 0 127.0.0.10:ipproto-255 *:* >>> UNCONN 0 0 :::ipv6-icmp :::* >>> UNCONN 0 0 :::ipv6-icmp :::* >>> ESTAB 0 0 ::1:ipproto-255 ::1:ipproto-9091 >>> >>> so it get zapped out. Is there some other way to test it? >>> >> >> 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 with > plain _RAW first and then extend to support _ICMP. I thought raw in this case was SOCK_RAW as in the socket type. Since the display is showing sockets in addition to IPPROTO_RAW: $ ss -A raw State Recv-Q Send-Q Local Address:Port Peer Address:Port UNCONN 0 0 *%eth0:icmp *:* It is going to be confusing if only ipproto-255 sockets can be killed.