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)
commitb7853d73e39b099bbee149cac4c34dbf98f3fefa
tree6431a80756721b2deec71d5704b745032efa0432
parente099b2d9dfe25583e1ecf98bd31a9f12c2ec1b74
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