kernel: require admin permissions for swconfig set operations
[openwrt/openwrt.git] / target / linux / generic / files / drivers / net / phy / swconfig.c
index 699abd33dd894bd143ea72b6acf928184c78dadd..c70ca74cadde948bd330543cdf9811ce130899b1 100644 (file)
@@ -1025,16 +1025,19 @@ static struct genl_ops swconfig_ops[] = {
        },
        {
                .cmd = SWITCH_CMD_SET_GLOBAL,
+               .flags = GENL_ADMIN_PERM,
                .doit = swconfig_set_attr,
                .policy = switch_policy,
        },
        {
                .cmd = SWITCH_CMD_SET_VLAN,
+               .flags = GENL_ADMIN_PERM,
                .doit = swconfig_set_attr,
                .policy = switch_policy,
        },
        {
                .cmd = SWITCH_CMD_SET_PORT,
+               .flags = GENL_ADMIN_PERM,
                .doit = swconfig_set_attr,
                .policy = switch_policy,
        },