netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BRIDGE_FLAGS_MASTER is used instead of BRIDGE_VLAN_INFO_MASTER flag in bridge/vlan.c
@ 2014-08-13 19:20 Kevin Wilson
  2014-08-15  8:22 ` Kevin Wilson
  2014-08-15 16:06 ` Vlad Yasevich
  0 siblings, 2 replies; 3+ messages in thread
From: Kevin Wilson @ 2014-08-13 19:20 UTC (permalink / raw)
  To: netdev@vger.kernel.org; +Cc: Stephen Hemminger, vyasevic

Hello,

The BRIDGE_VLAN_INFO_MASTER flag was added to /include/uapi/linux/if_bridge.h
by commit 407af3299ef1ac7e87ce3fb530e32a009d1a9efd,
"Add netlink interface to configure vlans on bridge ports".
The value of this flag is checked in the kernel only in the br_afspec()
method, net/bridge/br_netlink.c.


Can someone please explain how and where is the BRIDGE_VLAN_INFO_MASTER
flag set in userspace? I cannot find such a case. The natural place
for it is bridge/vlan.c ?(of
proute2), but it is not set there, and  not in any other module of iproute2.
see:
http://git.kernel.org/cgit/linux/kernel/git/shemminger/iproute2.git/tree/bridge/vlan.c

There is another flag named "BRIDGE_FLAGS_MASTER" which is set in
bridge/vlan.c of iproute2.

Both these flags, BRIDGE_FLAGS_MASTER and BRIDGE_VLAN_INFO_MASTER,
appear in include/linux/if_bridge.h in iproute2, and both have the
value 1.

Could it be a mistake, and in fact when setting BRIDGE_FLAGS_MASTER
in bridge/vlan.c of iproute2, the meaning was to set
BRIDGE_VLAN_INFO_MASTER (but since both there values are the same,
it was not noticed since it caused no problem)? It
seems to me that we do not really mean to set
a bridge flag (BRIDGE_FLAGS_MASTER) in a vlan module.
This mistake is the only explanation I can think of for why
BRIDGE_VLAN_INFO_MASTER
is not used in bridge/vlan.c of iproute2.

If this is the case, I volunteer to send a patch to fix this
by setting BRIDGE_VLAN_INFO_MASTER instead of BRIDGE_FLAGS_MASTER
in bridge/vlan.c.

Regards,
Kevin

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

end of thread, other threads:[~2014-08-15 16:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-13 19:20 BRIDGE_FLAGS_MASTER is used instead of BRIDGE_VLAN_INFO_MASTER flag in bridge/vlan.c Kevin Wilson
2014-08-15  8:22 ` Kevin Wilson
2014-08-15 16:06 ` Vlad Yasevich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).