summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_ioctl.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-09-09 01:59:05 +0200
committerDavid S. Miller <davem@davemloft.net>2008-09-09 01:59:05 +0200
commit17dce5dfe38ae2fb359b61e855f5d8a3a8b7892b (patch)
tree88bb1fcf84f9ebfa4299c9a8dcd9e6330b358446 /net/bridge/br_ioctl.c
parentnetns bridge: cleanup bridges during netns stop (diff)
parentMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinn... (diff)
downloadlinux-17dce5dfe38ae2fb359b61e855f5d8a3a8b7892b.tar.xz
linux-17dce5dfe38ae2fb359b61e855f5d8a3a8b7892b.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: net/mac80211/mlme.c
Diffstat (limited to 'net/bridge/br_ioctl.c')
-rw-r--r--net/bridge/br_ioctl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c
index 3ec1c636e620..6a6433daaf27 100644
--- a/net/bridge/br_ioctl.c
+++ b/net/bridge/br_ioctl.c
@@ -188,15 +188,21 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
return 0;
case BRCTL_SET_BRIDGE_HELLO_TIME:
+ {
+ unsigned long t = clock_t_to_jiffies(args[1]);
if (!capable(CAP_NET_ADMIN))
return -EPERM;
+ if (t < HZ)
+ return -EINVAL;
+
spin_lock_bh(&br->lock);
- br->bridge_hello_time = clock_t_to_jiffies(args[1]);
+ br->bridge_hello_time = t;
if (br_is_root_bridge(br))
br->hello_time = br->bridge_hello_time;
spin_unlock_bh(&br->lock);
return 0;
+ }
case BRCTL_SET_BRIDGE_MAX_AGE:
if (!capable(CAP_NET_ADMIN))