Skip to content

Commit c5ab9b1

Browse files
idoschdavem330
authored andcommitted
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>
1 parent 44075f5 commit c5ab9b1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎net/core/drop_monitor.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ static const struct genl_ops dropmon_ops[] = {
409409
.cmd = NET_DM_CMD_CONFIG,
410410
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
411411
.doit = net_dm_cmd_config,
412+
.flags = GENL_ADMIN_PERM,
412413
},
413414
{
414415
.cmd = NET_DM_CMD_START,

0 commit comments

Comments
 (0)