Subject: Re: [PATCH] net-sysfs: make flags symmetrical

From: Ben Greear <[email-masked]>
Date: Mon, 01 Apr 2013 14:32:44 -0700

On 04/01/2013 02:18 PM, David Miller wrote:
> From: Ben Greear <[email-masked]>
> Date: Mon, 01 Apr 2013 13:16:43 -0700
>
>> I am depending on this feature.  There is no other way I know
>> of to determine if an interface is actually currently acting
>> PROMISC or not.
>
> Netlink interface dump, SIOGIFCONF, etc. should provide this
> information in one form or another.

 From looking elsewhere in my code, I think you are right, at least
about netlink.

The IFLA_PROMISCUITY field seems to give good results, but if you try
to parse the ifinfomsg->ifi_flags method, it may lie to you
and tell you the netdev is not PROMISSC when it really is PROMISC.

I haven't tried SIOGIFCONF...

Either way, I'd prefer the sysfs flags stay as is...while I have
the netlink interface coded up in my app, it is not exactly light
programming and other tools may find it much easier to use
the sysfs flags.  And, since I've been using the sysfs flags
to double-check netlink in some cases, I'll have to add yet more
hacks if this compatibility is broken in newer kernels...

Thanks,
Ben

-- 
Ben Greear <[email-masked]>
Candela Technologies Inc  http://www.candelatech.com