aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2019-08-11 10:35:49 +0300
committerDavid S. Miller <davem@davemloft.net>2019-08-11 10:53:30 -0700
commitc5ab9b1c41f6d89d84fe147e51fe623f90bd026c (patch)
tree2eedefd8b42ec9ec812d959448a17caf2a200e0c /net
parentdrop_monitor: Reset per-CPU data before starting to trace (diff)
downloadlinux-dev-c5ab9b1c41f6d89d84fe147e51fe623f90bd026c.tar.xz
linux-dev-c5ab9b1c41f6d89d84fe147e51fe623f90bd026c.zip
drop_monitor: Require CAP_NET_ADMIN for drop monitor configuration
Currently, the configure command does not do anything but return an error. Subsequent patches will enable the command to change various configuration options such as alert mode and packet truncation. Similar to other netlink-based configuration channels, make sure only users with the CAP_NET_ADMIN capability set can execute this command. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/drop_monitor.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
index 1cf4988de591..cd2f3069f34e 100644
--- a/net/core/drop_monitor.c
+++ b/net/core/drop_monitor.c
@@ -409,6 +409,7 @@ static const struct genl_ops dropmon_ops[] = {
.cmd = NET_DM_CMD_CONFIG,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = net_dm_cmd_config,
+ .flags = GENL_ADMIN_PERM,
},
{
.cmd = NET_DM_CMD_START,