lkml.org 
[lkml]   [2016]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3] net: ip, diag -- Add diag interface for raw sockets
From
Date
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.

\
 
 \ /
  Last update: 2016-09-17 09:59    [W:2.277 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site