Commit d6fd1a24 authored by David Johnson's avatar David Johnson

Allow openvz containers that have CAP_NET_ADMIN to change tq_queue_len

on devices they contain.
parent ec9c1d57
--- net/core/dev.c~ 2009-08-21 14:21:40.000000000 -0600
+++ net/core/dev.c 2009-08-21 14:22:11.000000000 -0600
@@ -2878,6 +2878,14 @@
case SIOCDELMULTI:
case SIOCSIFHWBROADCAST:
case SIOCSIFTXQLEN:
+ if (!capable(CAP_NET_ADMIN) &&
+ !capable(CAP_VE_NET_ADMIN))
+ return -EPERM;
+ dev_load(ifr.ifr_name);
+ rtnl_lock();
+ ret = dev_ifsioc(&ifr, cmd);
+ rtnl_unlock();
+ return ret;
case SIOCSMIIREG:
case SIOCBONDENSLAVE:
case SIOCBONDRELEASE:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment