public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* IFF_LOWER_UP does not fit in ifr_flags
@ 2009-05-28 12:59 Fredrik Arnerup
  2009-05-30  3:50 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Fredrik Arnerup @ 2009-05-28 12:59 UTC (permalink / raw)
  To: linux-kernel

Documentation/networking/operstates.txt (and netdevice(7)) claims that
the flags IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO can be read from user space
using ioctl() with SIOCGIFFLAGS. Looking in include/linux/if.h however,
the flags are returned in a struct ifreq in the field ifr_flags which
is declared as a short, while the flags are defined as:

#define IFF_LOWER_UP    0x10000         /* driver signals L1 up         */
#define IFF_DORMANT     0x20000         /* driver signals dormant       */
#define IFF_ECHO        0x40000         /* echo sent packets            */

Those aren't shorts, are they? In net/core/dev.c dev_get_flags() returns
an unsigned which is assigned to ifr_flags directly.

Looked at linux/kernel/git/stable/linux-2.6.29.y.git.
CC me please.

/Fredrik Arnerup
fredrik.arnerup@edgeware.tv


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-06-12  3:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-28 12:59 IFF_LOWER_UP does not fit in ifr_flags Fredrik Arnerup
2009-05-30  3:50 ` Andrew Morton
2009-06-05 16:24   ` [PATCH] " John Dykstra
2009-06-12  3:57     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox