lkml.org 
[lkml]   [2016]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets
From
Date
On 16-09-28 08:27 AM, Jamal Hadi Salim wrote:
> On 16-09-28 08:16 AM, David Miller wrote:
>> From: Jamal Hadi Salim <jhs@mojatatu.com>
>> Date: Wed, 28 Sep 2016 08:09:28 -0400
>>
>>> On 16-09-28 08:07 AM, David Miller wrote:
>>>
>>>> Right, it would be legal for an existing user to have code that
>>>> explicitly initializes every member of the structure, including 'pad'.
>>>> So we have to keep that member around, at a minimum, for their sake.
>>>>
>>>
>>> I think we need to start labelling any new pad fields added as
>>> "Not UAPI. Do not fsck fondle this".
>>
>> They must initialize it to zero.
>>
>
> What if in the future actually meant to use 0 for
> something?;-> For example in Cyrill's case it means PROTO_IP
> Not sure if it useful to interpret or not but it is part of the
> enum for protocols.

I just tested with: socket(AF_INET, SOCK_RAW, 0);

and got back: EPROTONOSUPPORT

So in this case doesnt matter. But my point stands i.e 0 could mean
something.

cheers,
jamal

\
 
 \ /
  Last update: 2016-09-28 14:38    [W:0.055 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site