[BRIDGE]: netlink interface for link management
Add basic netlink support to the Ethernet bridge. Including: * dump interfaces in bridges * monitor link status changes * change state of bridge port For some demo programs see: http://developer.osdl.org/shemminger/prototypes/brnl.tar.gz These are to allow building a daemon that does alternative implementations of Spanning Tree Protocol. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
c090971326
commit
11dc1f36a6
@ -16,6 +16,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
|
||||
#include "br_private.h"
|
||||
#include "br_private_stp.h"
|
||||
@ -86,6 +87,7 @@ void br_stp_disable_bridge(struct net_bridge *br)
|
||||
void br_stp_enable_port(struct net_bridge_port *p)
|
||||
{
|
||||
br_init_port(p);
|
||||
br_ifinfo_notify(RTM_NEWLINK, p);
|
||||
br_port_state_selection(p->br);
|
||||
}
|
||||
|
||||
@ -99,6 +101,8 @@ void br_stp_disable_port(struct net_bridge_port *p)
|
||||
printk(KERN_INFO "%s: port %i(%s) entering %s state\n",
|
||||
br->dev->name, p->port_no, p->dev->name, "disabled");
|
||||
|
||||
br_ifinfo_notify(RTM_DELLINK, p);
|
||||
|
||||
wasroot = br_is_root_bridge(br);
|
||||
br_become_designated_port(p);
|
||||
p->state = BR_STATE_DISABLED;
|
||||
|
Reference in New Issue
Block a user