diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-04-09 15:57:54 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:47 -0400 |
commit | 9cf637473c8535b5abe27fee79254c2d552e042a (patch) | |
tree | 98d73249a2a75eaa23bbbc6c235eca0182f52a3d /net/bridge/br_sysfs_if.c | |
parent | 3f890923182aeebc572f3818dd51c9014827e0ec (diff) |
bridge: add sysfs hook to flush forwarding table
The RSTP daemon needs to be able to flush all dynamic forwarding
entries in the case of topology change.
This is a temporary interface. It will change to a netlink interface
before RSTP daemon is officially released.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Diffstat (limited to 'net/bridge/br_sysfs_if.c')
-rw-r--r-- | net/bridge/br_sysfs_if.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/bridge/br_sysfs_if.c b/net/bridge/br_sysfs_if.c index 0bc2aef8f9f3..2da22927d8dd 100644 --- a/net/bridge/br_sysfs_if.c +++ b/net/bridge/br_sysfs_if.c | |||
@@ -137,6 +137,13 @@ static ssize_t show_hold_timer(struct net_bridge_port *p, | |||
137 | } | 137 | } |
138 | static BRPORT_ATTR(hold_timer, S_IRUGO, show_hold_timer, NULL); | 138 | static BRPORT_ATTR(hold_timer, S_IRUGO, show_hold_timer, NULL); |
139 | 139 | ||
140 | static ssize_t store_flush(struct net_bridge_port *p, unsigned long v) | ||
141 | { | ||
142 | br_fdb_delete_by_port(p->br, p, 0); // Don't delete local entry | ||
143 | return 0; | ||
144 | } | ||
145 | static BRPORT_ATTR(flush, S_IWUSR, NULL, store_flush); | ||
146 | |||
140 | static struct brport_attribute *brport_attrs[] = { | 147 | static struct brport_attribute *brport_attrs[] = { |
141 | &brport_attr_path_cost, | 148 | &brport_attr_path_cost, |
142 | &brport_attr_priority, | 149 | &brport_attr_priority, |
@@ -152,6 +159,7 @@ static struct brport_attribute *brport_attrs[] = { | |||
152 | &brport_attr_message_age_timer, | 159 | &brport_attr_message_age_timer, |
153 | &brport_attr_forward_delay_timer, | 160 | &brport_attr_forward_delay_timer, |
154 | &brport_attr_hold_timer, | 161 | &brport_attr_hold_timer, |
162 | &brport_attr_flush, | ||
155 | NULL | 163 | NULL |
156 | }; | 164 | }; |
157 | 165 | ||