aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_ioctl.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-03-21 17:22:44 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:28:48 -0400
commit9cde070874b822d4677f4f01fe146991785813b1 (patch)
tree2e3a444ad82e026237ce99a4f8cad201f6ca807d /net/bridge/br_ioctl.c
parent9cf637473c8535b5abe27fee79254c2d552e042a (diff)
bridge: add support for user mode STP
This patchset based on work by Aji_Srinivas@emc.com provides allows spanning tree to be controled from userspace. Like hotplug, it uses call_usermodehelper when spanning tree is enabled so there is no visible API change. If call to start usermode STP fails it falls back to existing kernel STP. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Diffstat (limited to 'net/bridge/br_ioctl.c')
-rw-r--r--net/bridge/br_ioctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c
index 147015fe5c75..eda0fbfc923a 100644
--- a/net/bridge/br_ioctl.c
+++ b/net/bridge/br_ioctl.c
@@ -137,7 +137,8 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
137 b.topology_change = br->topology_change; 137 b.topology_change = br->topology_change;
138 b.topology_change_detected = br->topology_change_detected; 138 b.topology_change_detected = br->topology_change_detected;
139 b.root_port = br->root_port; 139 b.root_port = br->root_port;
140 b.stp_enabled = br->stp_enabled; 140
141 b.stp_enabled = (br->stp_enabled != BR_NO_STP);
141 b.ageing_time = jiffies_to_clock_t(br->ageing_time); 142 b.ageing_time = jiffies_to_clock_t(br->ageing_time);
142 b.hello_timer_value = br_timer_value(&br->hello_timer); 143 b.hello_timer_value = br_timer_value(&br->hello_timer);
143 b.tcn_timer_value = br_timer_value(&br->tcn_timer); 144 b.tcn_timer_value = br_timer_value(&br->tcn_timer);
@@ -251,7 +252,7 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
251 if (!capable(CAP_NET_ADMIN)) 252 if (!capable(CAP_NET_ADMIN))
252 return -EPERM; 253 return -EPERM;
253 254
254 br->stp_enabled = args[1]?1:0; 255 br_stp_set_enabled(br, args[1]);
255 return 0; 256 return 0;
256 257
257 case BRCTL_SET_BRIDGE_PRIORITY: 258 case BRCTL_SET_BRIDGE_PRIORITY: