flags & IFF_PROMISC -- rtnetlink and sysfs
From: Tomas Janousek
Date: Tue Nov 20 2007 - 11:03:18 EST
Hello,
while investigating the issue that ifconfig and ip link ls does not show the
PROMISC flag while tcpdump is running, I found that flags returned in
rtnetlink's ifinfo and /sys/class/net/eth0/flags differ.
rtnetlink (net/core/rtnetlink.c:rtnl_fill_ifinfo) calls dev_get_flags
(net/core/dev.c) to get the flags. Sysfs (net/core/net-sysfs.c) just shows
what is in net->flags. Is this difference intentional?
On the other hand, it's good that this net->flags is accessible somewhere,
because it shows the real state of the PROMISC flag.
If we want to show the real state in ip/ifconfig, what do you think we should
do? Read /sys/class/net/eth0/flags?
If this issue had been brought up before and decided, sorry.
--
Tomas Janousek, SW Engineer, Red Hat, Inc.
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html