Message ID | 1532991076-3672-6-git-send-email-tyhicks@canonical.com |
---|---|
State | New |
Headers | show |
Series | Make /sys/class/net per net namespace objects belong to container | expand |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index bb7e80f4ced3..87bb881459b6 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -1070,6 +1070,9 @@ static ssize_t tx_maxrate_store(struct netdev_queue *queue, int err, index = get_netdev_queue_index(queue); u32 rate = 0; + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + err = kstrtou32(buf, 10, &rate); if (err < 0) return err;