]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: add vlan info to bridge setlink and dellink notification messages
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Sun, 22 Feb 2015 04:21:51 +0000 (20:21 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Feb 2015 04:00:45 +0000 (23:00 -0500)
commitd0fa6e40717da2003c683293dc8ac2d057aaac62
tree6431a80756721b2deec71d5704b745032efa0432
parentad42cdc65daed81413824ced77445a865872382c
bridge: add vlan info to bridge setlink and dellink notification messages

vlan add/deletes are not notified to userspace today. This patch adds
vlan info to bridge newlink/dellink notifications generated from the
bridge driver. Notifications use the RTEXT_FILTER_BRVLAN_COMPRESSED
flag to compress vlans into ranges whereever applicable.

The size calculations does not take ranges into account for
simplicity.  This has the potential for allocating a larger skb than
required.

There is an existing inconsistency with bridge NEWLINK and DELLINK
change notifications. Both generate NEWLINK notifications.  Since its
always a NEWLINK notification, this patch includes all vlans the port
belongs to in the notification. The NEWLINK and DELLINK request
messages however only include the vlans to be added and deleted.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_netlink.c