patch-2.4.15 linux/net/core/dev.c
Next file: linux/net/decnet/af_decnet.c
Previous file: linux/net/bridge/br_stp_bpdu.c
Back to the patch index
Back to the overall index
- Lines: 41
- Date:
Wed Nov 7 14:39:36 2001
- Orig file:
v2.4.14/linux/net/core/dev.c
- Orig date:
Mon Nov 5 15:55:36 2001
diff -u --recursive --new-file v2.4.14/linux/net/core/dev.c linux/net/core/dev.c
@@ -565,11 +565,11 @@
/*
* Verify the string as this thing may have come from
- * the user. There must be one "%d" and no other "%"
- * characters.
+ * the user. There must be either one "%d" and no other "%"
+ * characters, or no "%" characters at all.
*/
p = strchr(name, '%');
- if (!p || p[1] != 'd' || strchr(p+2, '%'))
+ if (p && (p[1] != 'd' || strchr(p+2, '%')))
return -EINVAL;
/*
@@ -2221,6 +2221,12 @@
default:
if ((cmd >= SIOCDEVPRIVATE &&
cmd <= SIOCDEVPRIVATE + 15) ||
+ cmd == SIOCBONDENSLAVE ||
+ cmd == SIOCBONDRELEASE ||
+ cmd == SIOCBONDSETHWADDR ||
+ cmd == SIOCBONDSLAVEINFOQUERY ||
+ cmd == SIOCBONDINFOQUERY ||
+ cmd == SIOCBONDCHANGEACTIVE ||
cmd == SIOCETHTOOL ||
cmd == SIOCGMIIPHY ||
cmd == SIOCGMIIREG ||
@@ -2372,6 +2378,12 @@
case SIOCSIFTXQLEN:
case SIOCSIFNAME:
case SIOCSMIIREG:
+ case SIOCBONDENSLAVE:
+ case SIOCBONDRELEASE:
+ case SIOCBONDSETHWADDR:
+ case SIOCBONDSLAVEINFOQUERY:
+ case SIOCBONDINFOQUERY:
+ case SIOCBONDCHANGEACTIVE:
if (!capable(CAP_NET_ADMIN))
return -EPERM;
dev_load(ifr.ifr_name);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)