summaryrefslogtreecommitdiffstats
path: root/net/bridge/br.c
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2011-04-04 14:03:32 +0000
committerDavid S. Miller <davem@davemloft.net>2011-04-04 17:22:28 -0700
commitbb900b27a2f49b37bc38c08e656ea13048fee13b (patch)
treedbea65f697ee131de15a7b6d94466744ad346594 /net/bridge/br.c
parent36fd2b63e3b4336744cf3f6a6c9543ecbec334a7 (diff)
downloadop-kernel-dev-bb900b27a2f49b37bc38c08e656ea13048fee13b.zip
op-kernel-dev-bb900b27a2f49b37bc38c08e656ea13048fee13b.tar.gz
bridge: allow creating bridge devices with netlink
Add netlink device ops to allow creating bridge device via netlink. This works in a manner similar to vlan, macvlan and bonding. Example: # ip link add link dev br0 type bridge # ip link del dev br0 The change required rearranging initializtion code to deal with being called by create link. Most of the initialization happens in br_dev_setup, but allocation of stats is done in ndo_init callback to deal with allocation failure. Sysfs setup has to wait until after the network device kobject is registered. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br.c')
-rw-r--r--net/bridge/br.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bridge/br.c b/net/bridge/br.c
index 84bbb82..f20c4fd 100644
--- a/net/bridge/br.c
+++ b/net/bridge/br.c
@@ -104,3 +104,4 @@ module_init(br_init)
module_exit(br_deinit)
MODULE_LICENSE("GPL");
MODULE_VERSION(BR_VERSION);
+MODULE_ALIAS_RTNL_LINK("bridge");
OpenPOWER on IntegriCloud