]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: bridge port parameters over netlink
authorstephen hemminger <shemminger@vyatta.com>
Tue, 13 Nov 2012 07:53:05 +0000 (07:53 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Nov 2012 01:20:44 +0000 (20:20 -0500)
commitceefdfa2439a1a5f6a51127baf1220eb4780c0cd
tree6415de59be04019fa15a3e7cb2c53d1ecc930c48
parentd9977c0ab3012e496da33691b6203c9a6b3b4485
bridge: bridge port parameters over netlink

Expose bridge port parameter over netlink. By switching to a nested
message, this can be used for other bridge parameters.

This changes IFLA_PROTINFO attribute from one byte to a full nested
set of attributes. This is safe for application interface because the
old message used IFLA_PROTINFO and new one uses
 IFLA_PROTINFO | NLA_F_NESTED.

The code adapts to old format requests, and therefore stays
compatible with user mode RSTP daemon. Since the type field
for nested and unnested attributes are different, and the old
code in libnetlink doesn't do the mask, it is also safe to use
with old versions of bridge monitor command.

Note: although mode is only a boolean, treating it as a
full byte since in the future someone will probably want to add more
values (like macvlan has).

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/if_link.h
net/bridge/br_netlink.c