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

From: Stephen Hemminger <[email-masked]>
Date: Mon, 1 Apr 2013 15:04:07 -0700

On Mon, 01 Apr 2013 13:16:43 -0700
Ben Greear <[email-masked]> wrote:

> On 04/01/2013 11:53 AM, Stephen Hemminger wrote:
> > The flags reported by sysfs are the raw kernel flags, not the version
> > exported to user space. This leads to the unsymmetrical behaviour that
> > read != write. An example of this is when a device is part of a
> > bridge.  The PROMISC flag returned from sysfs will not be the same as
> > other API's.
> >
> > The reason this patch deserves wider discussion is someone might be
> > depending on sysfs to read raw kernel flags.
> 
> 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.
> 
> Please don't 'fix' this.
> 
> Thanks,
> Ben
> 

The real problem is there isn't a netlink attribute that encodes
the real flags (there should be), and when device changes state a notification
should be sent.