mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 14:05:39 +00:00
genetlink: optionally validate strictly/dumps
Add options to strictly validate messages and dump messages, sometimes perhaps validating dump messages non-strictly may be required, so add an option for that as well. Since none of this can really be applied to existing commands, set the options everwhere using the following spatch: @@ identifier ops; expression X; @@ struct genl_ops ops[] = { ..., { .cmd = X, + .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, ... }, ... }; For new commands one should just not copy the .validate 'opt-out' flags and thus get strict validation. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
56738f4608
commit
ef6243acb4
@ -2003,18 +2003,22 @@ static int nbd_genl_reconfigure(struct sk_buff *skb, struct genl_info *info)
|
|||||||
static const struct genl_ops nbd_connect_genl_ops[] = {
|
static const struct genl_ops nbd_connect_genl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = NBD_CMD_CONNECT,
|
.cmd = NBD_CMD_CONNECT,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nbd_genl_connect,
|
.doit = nbd_genl_connect,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NBD_CMD_DISCONNECT,
|
.cmd = NBD_CMD_DISCONNECT,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nbd_genl_disconnect,
|
.doit = nbd_genl_disconnect,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NBD_CMD_RECONFIGURE,
|
.cmd = NBD_CMD_RECONFIGURE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nbd_genl_reconfigure,
|
.doit = nbd_genl_reconfigure,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NBD_CMD_STATUS,
|
.cmd = NBD_CMD_STATUS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nbd_genl_status,
|
.doit = nbd_genl_status,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -1270,16 +1270,19 @@ static const struct nla_policy gtp_genl_policy[GTPA_MAX + 1] = {
|
|||||||
static const struct genl_ops gtp_genl_ops[] = {
|
static const struct genl_ops gtp_genl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = GTP_CMD_NEWPDP,
|
.cmd = GTP_CMD_NEWPDP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = gtp_genl_new_pdp,
|
.doit = gtp_genl_new_pdp,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = GTP_CMD_DELPDP,
|
.cmd = GTP_CMD_DELPDP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = gtp_genl_del_pdp,
|
.doit = gtp_genl_del_pdp,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = GTP_CMD_GETPDP,
|
.cmd = GTP_CMD_GETPDP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = gtp_genl_get_pdp,
|
.doit = gtp_genl_get_pdp,
|
||||||
.dumpit = gtp_genl_dump_pdp,
|
.dumpit = gtp_genl_dump_pdp,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
|
@ -594,31 +594,37 @@ static const struct nla_policy hwsim_genl_policy[MAC802154_HWSIM_ATTR_MAX + 1] =
|
|||||||
static const struct genl_ops hwsim_nl_ops[] = {
|
static const struct genl_ops hwsim_nl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = MAC802154_HWSIM_CMD_NEW_RADIO,
|
.cmd = MAC802154_HWSIM_CMD_NEW_RADIO,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = hwsim_new_radio_nl,
|
.doit = hwsim_new_radio_nl,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = MAC802154_HWSIM_CMD_DEL_RADIO,
|
.cmd = MAC802154_HWSIM_CMD_DEL_RADIO,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = hwsim_del_radio_nl,
|
.doit = hwsim_del_radio_nl,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = MAC802154_HWSIM_CMD_GET_RADIO,
|
.cmd = MAC802154_HWSIM_CMD_GET_RADIO,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = hwsim_get_radio_nl,
|
.doit = hwsim_get_radio_nl,
|
||||||
.dumpit = hwsim_dump_radio_nl,
|
.dumpit = hwsim_dump_radio_nl,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = MAC802154_HWSIM_CMD_NEW_EDGE,
|
.cmd = MAC802154_HWSIM_CMD_NEW_EDGE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = hwsim_new_edge_nl,
|
.doit = hwsim_new_edge_nl,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = MAC802154_HWSIM_CMD_DEL_EDGE,
|
.cmd = MAC802154_HWSIM_CMD_DEL_EDGE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = hwsim_del_edge_nl,
|
.doit = hwsim_del_edge_nl,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = MAC802154_HWSIM_CMD_SET_EDGE,
|
.cmd = MAC802154_HWSIM_CMD_SET_EDGE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = hwsim_set_edge_lqi,
|
.doit = hwsim_set_edge_lqi,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
|
@ -2637,50 +2637,60 @@ static int macsec_dump_txsc(struct sk_buff *skb, struct netlink_callback *cb)
|
|||||||
static const struct genl_ops macsec_genl_ops[] = {
|
static const struct genl_ops macsec_genl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = MACSEC_CMD_GET_TXSC,
|
.cmd = MACSEC_CMD_GET_TXSC,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.dumpit = macsec_dump_txsc,
|
.dumpit = macsec_dump_txsc,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = MACSEC_CMD_ADD_RXSC,
|
.cmd = MACSEC_CMD_ADD_RXSC,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = macsec_add_rxsc,
|
.doit = macsec_add_rxsc,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = MACSEC_CMD_DEL_RXSC,
|
.cmd = MACSEC_CMD_DEL_RXSC,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = macsec_del_rxsc,
|
.doit = macsec_del_rxsc,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = MACSEC_CMD_UPD_RXSC,
|
.cmd = MACSEC_CMD_UPD_RXSC,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = macsec_upd_rxsc,
|
.doit = macsec_upd_rxsc,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = MACSEC_CMD_ADD_TXSA,
|
.cmd = MACSEC_CMD_ADD_TXSA,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = macsec_add_txsa,
|
.doit = macsec_add_txsa,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = MACSEC_CMD_DEL_TXSA,
|
.cmd = MACSEC_CMD_DEL_TXSA,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = macsec_del_txsa,
|
.doit = macsec_del_txsa,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = MACSEC_CMD_UPD_TXSA,
|
.cmd = MACSEC_CMD_UPD_TXSA,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = macsec_upd_txsa,
|
.doit = macsec_upd_txsa,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = MACSEC_CMD_ADD_RXSA,
|
.cmd = MACSEC_CMD_ADD_RXSA,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = macsec_add_rxsa,
|
.doit = macsec_add_rxsa,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = MACSEC_CMD_DEL_RXSA,
|
.cmd = MACSEC_CMD_DEL_RXSA,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = macsec_del_rxsa,
|
.doit = macsec_del_rxsa,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = MACSEC_CMD_UPD_RXSA,
|
.cmd = MACSEC_CMD_UPD_RXSA,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = macsec_upd_rxsa,
|
.doit = macsec_upd_rxsa,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
|
@ -2757,20 +2757,24 @@ static int team_nl_cmd_port_list_get(struct sk_buff *skb,
|
|||||||
static const struct genl_ops team_nl_ops[] = {
|
static const struct genl_ops team_nl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = TEAM_CMD_NOOP,
|
.cmd = TEAM_CMD_NOOP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = team_nl_cmd_noop,
|
.doit = team_nl_cmd_noop,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TEAM_CMD_OPTIONS_SET,
|
.cmd = TEAM_CMD_OPTIONS_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = team_nl_cmd_options_set,
|
.doit = team_nl_cmd_options_set,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TEAM_CMD_OPTIONS_GET,
|
.cmd = TEAM_CMD_OPTIONS_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = team_nl_cmd_options_get,
|
.doit = team_nl_cmd_options_get,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TEAM_CMD_PORT_LIST_GET,
|
.cmd = TEAM_CMD_PORT_LIST_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = team_nl_cmd_port_list_get,
|
.doit = team_nl_cmd_port_list_get,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
|
@ -3637,29 +3637,35 @@ static int hwsim_dump_radio_nl(struct sk_buff *skb,
|
|||||||
static const struct genl_ops hwsim_ops[] = {
|
static const struct genl_ops hwsim_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = HWSIM_CMD_REGISTER,
|
.cmd = HWSIM_CMD_REGISTER,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = hwsim_register_received_nl,
|
.doit = hwsim_register_received_nl,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = HWSIM_CMD_FRAME,
|
.cmd = HWSIM_CMD_FRAME,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = hwsim_cloned_frame_received_nl,
|
.doit = hwsim_cloned_frame_received_nl,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = HWSIM_CMD_TX_INFO_FRAME,
|
.cmd = HWSIM_CMD_TX_INFO_FRAME,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = hwsim_tx_info_frame_received_nl,
|
.doit = hwsim_tx_info_frame_received_nl,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = HWSIM_CMD_NEW_RADIO,
|
.cmd = HWSIM_CMD_NEW_RADIO,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = hwsim_new_radio_nl,
|
.doit = hwsim_new_radio_nl,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = HWSIM_CMD_DEL_RADIO,
|
.cmd = HWSIM_CMD_DEL_RADIO,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = hwsim_del_radio_nl,
|
.doit = hwsim_del_radio_nl,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = HWSIM_CMD_GET_RADIO,
|
.cmd = HWSIM_CMD_GET_RADIO,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = hwsim_get_radio_nl,
|
.doit = hwsim_get_radio_nl,
|
||||||
.dumpit = hwsim_dump_radio_nl,
|
.dumpit = hwsim_dump_radio_nl,
|
||||||
},
|
},
|
||||||
|
@ -441,21 +441,25 @@ static int tcmu_genl_set_features(struct sk_buff *skb, struct genl_info *info)
|
|||||||
static const struct genl_ops tcmu_genl_ops[] = {
|
static const struct genl_ops tcmu_genl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = TCMU_CMD_SET_FEATURES,
|
.cmd = TCMU_CMD_SET_FEATURES,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = tcmu_genl_set_features,
|
.doit = tcmu_genl_set_features,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TCMU_CMD_ADDED_DEVICE_DONE,
|
.cmd = TCMU_CMD_ADDED_DEVICE_DONE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = tcmu_genl_add_dev_done,
|
.doit = tcmu_genl_add_dev_done,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TCMU_CMD_REMOVED_DEVICE_DONE,
|
.cmd = TCMU_CMD_REMOVED_DEVICE_DONE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = tcmu_genl_rm_dev_done,
|
.doit = tcmu_genl_rm_dev_done,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TCMU_CMD_RECONFIG_DEVICE_DONE,
|
.cmd = TCMU_CMD_RECONFIG_DEVICE_DONE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = tcmu_genl_reconfig_dev_done,
|
.doit = tcmu_genl_reconfig_dev_done,
|
||||||
},
|
},
|
||||||
|
@ -68,6 +68,7 @@ static int user_cmd(struct sk_buff *skb, struct genl_info *info)
|
|||||||
static const struct genl_ops dlm_nl_ops[] = {
|
static const struct genl_ops dlm_nl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = DLM_CMD_HELLO,
|
.cmd = DLM_CMD_HELLO,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = user_cmd,
|
.doit = user_cmd,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -121,6 +121,12 @@ static inline int genl_err_attr(struct genl_info *info, int err,
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum genl_validate_flags {
|
||||||
|
GENL_DONT_VALIDATE_STRICT = BIT(0),
|
||||||
|
GENL_DONT_VALIDATE_DUMP = BIT(1),
|
||||||
|
GENL_DONT_VALIDATE_DUMP_STRICT = BIT(2),
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct genl_ops - generic netlink operations
|
* struct genl_ops - generic netlink operations
|
||||||
* @cmd: command identifier
|
* @cmd: command identifier
|
||||||
@ -141,6 +147,7 @@ struct genl_ops {
|
|||||||
u8 cmd;
|
u8 cmd;
|
||||||
u8 internal_flags;
|
u8 internal_flags;
|
||||||
u8 flags;
|
u8 flags;
|
||||||
|
u8 validate;
|
||||||
};
|
};
|
||||||
|
|
||||||
int genl_register_family(struct genl_family *family);
|
int genl_register_family(struct genl_family *family);
|
||||||
|
@ -649,12 +649,14 @@ void taskstats_exit(struct task_struct *tsk, int group_dead)
|
|||||||
static const struct genl_ops taskstats_ops[] = {
|
static const struct genl_ops taskstats_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = TASKSTATS_CMD_GET,
|
.cmd = TASKSTATS_CMD_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = taskstats_user_cmd,
|
.doit = taskstats_user_cmd,
|
||||||
/* policy enforced later */
|
/* policy enforced later */
|
||||||
.flags = GENL_ADMIN_PERM | GENL_CMD_CAP_HASPOL,
|
.flags = GENL_ADMIN_PERM | GENL_CMD_CAP_HASPOL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = CGROUPSTATS_CMD_GET,
|
.cmd = CGROUPSTATS_CMD_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = cgroupstats_user_cmd,
|
.doit = cgroupstats_user_cmd,
|
||||||
/* policy enforced later */
|
/* policy enforced later */
|
||||||
.flags = GENL_CMD_CAP_HASPOL,
|
.flags = GENL_CMD_CAP_HASPOL,
|
||||||
|
@ -1343,29 +1343,34 @@ static void batadv_post_doit(const struct genl_ops *ops, struct sk_buff *skb,
|
|||||||
static const struct genl_ops batadv_netlink_ops[] = {
|
static const struct genl_ops batadv_netlink_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_GET_MESH,
|
.cmd = BATADV_CMD_GET_MESH,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
/* can be retrieved by unprivileged users */
|
/* can be retrieved by unprivileged users */
|
||||||
.doit = batadv_netlink_get_mesh,
|
.doit = batadv_netlink_get_mesh,
|
||||||
.internal_flags = BATADV_FLAG_NEED_MESH,
|
.internal_flags = BATADV_FLAG_NEED_MESH,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_TP_METER,
|
.cmd = BATADV_CMD_TP_METER,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = batadv_netlink_tp_meter_start,
|
.doit = batadv_netlink_tp_meter_start,
|
||||||
.internal_flags = BATADV_FLAG_NEED_MESH,
|
.internal_flags = BATADV_FLAG_NEED_MESH,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_TP_METER_CANCEL,
|
.cmd = BATADV_CMD_TP_METER_CANCEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = batadv_netlink_tp_meter_cancel,
|
.doit = batadv_netlink_tp_meter_cancel,
|
||||||
.internal_flags = BATADV_FLAG_NEED_MESH,
|
.internal_flags = BATADV_FLAG_NEED_MESH,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_GET_ROUTING_ALGOS,
|
.cmd = BATADV_CMD_GET_ROUTING_ALGOS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.dumpit = batadv_algo_dump,
|
.dumpit = batadv_algo_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_GET_HARDIF,
|
.cmd = BATADV_CMD_GET_HARDIF,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
/* can be retrieved by unprivileged users */
|
/* can be retrieved by unprivileged users */
|
||||||
.dumpit = batadv_netlink_dump_hardif,
|
.dumpit = batadv_netlink_dump_hardif,
|
||||||
.doit = batadv_netlink_get_hardif,
|
.doit = batadv_netlink_get_hardif,
|
||||||
@ -1374,57 +1379,68 @@ static const struct genl_ops batadv_netlink_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_GET_TRANSTABLE_LOCAL,
|
.cmd = BATADV_CMD_GET_TRANSTABLE_LOCAL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.dumpit = batadv_tt_local_dump,
|
.dumpit = batadv_tt_local_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_GET_TRANSTABLE_GLOBAL,
|
.cmd = BATADV_CMD_GET_TRANSTABLE_GLOBAL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.dumpit = batadv_tt_global_dump,
|
.dumpit = batadv_tt_global_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_GET_ORIGINATORS,
|
.cmd = BATADV_CMD_GET_ORIGINATORS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.dumpit = batadv_orig_dump,
|
.dumpit = batadv_orig_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_GET_NEIGHBORS,
|
.cmd = BATADV_CMD_GET_NEIGHBORS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.dumpit = batadv_hardif_neigh_dump,
|
.dumpit = batadv_hardif_neigh_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_GET_GATEWAYS,
|
.cmd = BATADV_CMD_GET_GATEWAYS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.dumpit = batadv_gw_dump,
|
.dumpit = batadv_gw_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_GET_BLA_CLAIM,
|
.cmd = BATADV_CMD_GET_BLA_CLAIM,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.dumpit = batadv_bla_claim_dump,
|
.dumpit = batadv_bla_claim_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_GET_BLA_BACKBONE,
|
.cmd = BATADV_CMD_GET_BLA_BACKBONE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.dumpit = batadv_bla_backbone_dump,
|
.dumpit = batadv_bla_backbone_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_GET_DAT_CACHE,
|
.cmd = BATADV_CMD_GET_DAT_CACHE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.dumpit = batadv_dat_cache_dump,
|
.dumpit = batadv_dat_cache_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_GET_MCAST_FLAGS,
|
.cmd = BATADV_CMD_GET_MCAST_FLAGS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.dumpit = batadv_mcast_flags_dump,
|
.dumpit = batadv_mcast_flags_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_SET_MESH,
|
.cmd = BATADV_CMD_SET_MESH,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = batadv_netlink_set_mesh,
|
.doit = batadv_netlink_set_mesh,
|
||||||
.internal_flags = BATADV_FLAG_NEED_MESH,
|
.internal_flags = BATADV_FLAG_NEED_MESH,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_SET_HARDIF,
|
.cmd = BATADV_CMD_SET_HARDIF,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = batadv_netlink_set_hardif,
|
.doit = batadv_netlink_set_hardif,
|
||||||
.internal_flags = BATADV_FLAG_NEED_MESH |
|
.internal_flags = BATADV_FLAG_NEED_MESH |
|
||||||
@ -1432,6 +1448,7 @@ static const struct genl_ops batadv_netlink_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_GET_VLAN,
|
.cmd = BATADV_CMD_GET_VLAN,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
/* can be retrieved by unprivileged users */
|
/* can be retrieved by unprivileged users */
|
||||||
.doit = batadv_netlink_get_vlan,
|
.doit = batadv_netlink_get_vlan,
|
||||||
.internal_flags = BATADV_FLAG_NEED_MESH |
|
.internal_flags = BATADV_FLAG_NEED_MESH |
|
||||||
@ -1439,6 +1456,7 @@ static const struct genl_ops batadv_netlink_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = BATADV_CMD_SET_VLAN,
|
.cmd = BATADV_CMD_SET_VLAN,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = batadv_netlink_set_vlan,
|
.doit = batadv_netlink_set_vlan,
|
||||||
.internal_flags = BATADV_FLAG_NEED_MESH |
|
.internal_flags = BATADV_FLAG_NEED_MESH |
|
||||||
|
@ -4948,6 +4948,7 @@ static const struct nla_policy devlink_nl_policy[DEVLINK_ATTR_MAX + 1] = {
|
|||||||
static const struct genl_ops devlink_nl_ops[] = {
|
static const struct genl_ops devlink_nl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_GET,
|
.cmd = DEVLINK_CMD_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_get_doit,
|
.doit = devlink_nl_cmd_get_doit,
|
||||||
.dumpit = devlink_nl_cmd_get_dumpit,
|
.dumpit = devlink_nl_cmd_get_dumpit,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
@ -4955,6 +4956,7 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_PORT_GET,
|
.cmd = DEVLINK_CMD_PORT_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_port_get_doit,
|
.doit = devlink_nl_cmd_port_get_doit,
|
||||||
.dumpit = devlink_nl_cmd_port_get_dumpit,
|
.dumpit = devlink_nl_cmd_port_get_dumpit,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
|
||||||
@ -4962,12 +4964,14 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_PORT_SET,
|
.cmd = DEVLINK_CMD_PORT_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_port_set_doit,
|
.doit = devlink_nl_cmd_port_set_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_PORT_SPLIT,
|
.cmd = DEVLINK_CMD_PORT_SPLIT,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_port_split_doit,
|
.doit = devlink_nl_cmd_port_split_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
||||||
@ -4975,6 +4979,7 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_PORT_UNSPLIT,
|
.cmd = DEVLINK_CMD_PORT_UNSPLIT,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_port_unsplit_doit,
|
.doit = devlink_nl_cmd_port_unsplit_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
||||||
@ -4982,6 +4987,7 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_SB_GET,
|
.cmd = DEVLINK_CMD_SB_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_sb_get_doit,
|
.doit = devlink_nl_cmd_sb_get_doit,
|
||||||
.dumpit = devlink_nl_cmd_sb_get_dumpit,
|
.dumpit = devlink_nl_cmd_sb_get_dumpit,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
||||||
@ -4990,6 +4996,7 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_SB_POOL_GET,
|
.cmd = DEVLINK_CMD_SB_POOL_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_sb_pool_get_doit,
|
.doit = devlink_nl_cmd_sb_pool_get_doit,
|
||||||
.dumpit = devlink_nl_cmd_sb_pool_get_dumpit,
|
.dumpit = devlink_nl_cmd_sb_pool_get_dumpit,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
||||||
@ -4998,6 +5005,7 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_SB_POOL_SET,
|
.cmd = DEVLINK_CMD_SB_POOL_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_sb_pool_set_doit,
|
.doit = devlink_nl_cmd_sb_pool_set_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
||||||
@ -5005,6 +5013,7 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_SB_PORT_POOL_GET,
|
.cmd = DEVLINK_CMD_SB_PORT_POOL_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_sb_port_pool_get_doit,
|
.doit = devlink_nl_cmd_sb_port_pool_get_doit,
|
||||||
.dumpit = devlink_nl_cmd_sb_port_pool_get_dumpit,
|
.dumpit = devlink_nl_cmd_sb_port_pool_get_dumpit,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT |
|
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT |
|
||||||
@ -5013,6 +5022,7 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_SB_PORT_POOL_SET,
|
.cmd = DEVLINK_CMD_SB_PORT_POOL_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_sb_port_pool_set_doit,
|
.doit = devlink_nl_cmd_sb_port_pool_set_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT |
|
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT |
|
||||||
@ -5020,6 +5030,7 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_SB_TC_POOL_BIND_GET,
|
.cmd = DEVLINK_CMD_SB_TC_POOL_BIND_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_sb_tc_pool_bind_get_doit,
|
.doit = devlink_nl_cmd_sb_tc_pool_bind_get_doit,
|
||||||
.dumpit = devlink_nl_cmd_sb_tc_pool_bind_get_dumpit,
|
.dumpit = devlink_nl_cmd_sb_tc_pool_bind_get_dumpit,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT |
|
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT |
|
||||||
@ -5028,6 +5039,7 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_SB_TC_POOL_BIND_SET,
|
.cmd = DEVLINK_CMD_SB_TC_POOL_BIND_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_sb_tc_pool_bind_set_doit,
|
.doit = devlink_nl_cmd_sb_tc_pool_bind_set_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT |
|
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT |
|
||||||
@ -5035,6 +5047,7 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_SB_OCC_SNAPSHOT,
|
.cmd = DEVLINK_CMD_SB_OCC_SNAPSHOT,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_sb_occ_snapshot_doit,
|
.doit = devlink_nl_cmd_sb_occ_snapshot_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
||||||
@ -5042,6 +5055,7 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_SB_OCC_MAX_CLEAR,
|
.cmd = DEVLINK_CMD_SB_OCC_MAX_CLEAR,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_sb_occ_max_clear_doit,
|
.doit = devlink_nl_cmd_sb_occ_max_clear_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
||||||
@ -5049,12 +5063,14 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_ESWITCH_GET,
|
.cmd = DEVLINK_CMD_ESWITCH_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_eswitch_get_doit,
|
.doit = devlink_nl_cmd_eswitch_get_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_ESWITCH_SET,
|
.cmd = DEVLINK_CMD_ESWITCH_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_eswitch_set_doit,
|
.doit = devlink_nl_cmd_eswitch_set_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
||||||
@ -5062,42 +5078,49 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_DPIPE_TABLE_GET,
|
.cmd = DEVLINK_CMD_DPIPE_TABLE_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_dpipe_table_get,
|
.doit = devlink_nl_cmd_dpipe_table_get,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
/* can be retrieved by unprivileged users */
|
/* can be retrieved by unprivileged users */
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_DPIPE_ENTRIES_GET,
|
.cmd = DEVLINK_CMD_DPIPE_ENTRIES_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_dpipe_entries_get,
|
.doit = devlink_nl_cmd_dpipe_entries_get,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
/* can be retrieved by unprivileged users */
|
/* can be retrieved by unprivileged users */
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_DPIPE_HEADERS_GET,
|
.cmd = DEVLINK_CMD_DPIPE_HEADERS_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_dpipe_headers_get,
|
.doit = devlink_nl_cmd_dpipe_headers_get,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
/* can be retrieved by unprivileged users */
|
/* can be retrieved by unprivileged users */
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET,
|
.cmd = DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_dpipe_table_counters_set,
|
.doit = devlink_nl_cmd_dpipe_table_counters_set,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_RESOURCE_SET,
|
.cmd = DEVLINK_CMD_RESOURCE_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_resource_set,
|
.doit = devlink_nl_cmd_resource_set,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_RESOURCE_DUMP,
|
.cmd = DEVLINK_CMD_RESOURCE_DUMP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_resource_dump,
|
.doit = devlink_nl_cmd_resource_dump,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
/* can be retrieved by unprivileged users */
|
/* can be retrieved by unprivileged users */
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_RELOAD,
|
.cmd = DEVLINK_CMD_RELOAD,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_reload,
|
.doit = devlink_nl_cmd_reload,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
||||||
@ -5105,6 +5128,7 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_PARAM_GET,
|
.cmd = DEVLINK_CMD_PARAM_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_param_get_doit,
|
.doit = devlink_nl_cmd_param_get_doit,
|
||||||
.dumpit = devlink_nl_cmd_param_get_dumpit,
|
.dumpit = devlink_nl_cmd_param_get_dumpit,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
@ -5112,12 +5136,14 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_PARAM_SET,
|
.cmd = DEVLINK_CMD_PARAM_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_param_set_doit,
|
.doit = devlink_nl_cmd_param_set_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_PORT_PARAM_GET,
|
.cmd = DEVLINK_CMD_PORT_PARAM_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_port_param_get_doit,
|
.doit = devlink_nl_cmd_port_param_get_doit,
|
||||||
.dumpit = devlink_nl_cmd_port_param_get_dumpit,
|
.dumpit = devlink_nl_cmd_port_param_get_dumpit,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
|
||||||
@ -5125,12 +5151,14 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_PORT_PARAM_SET,
|
.cmd = DEVLINK_CMD_PORT_PARAM_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_port_param_set_doit,
|
.doit = devlink_nl_cmd_port_param_set_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_PORT,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_REGION_GET,
|
.cmd = DEVLINK_CMD_REGION_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_region_get_doit,
|
.doit = devlink_nl_cmd_region_get_doit,
|
||||||
.dumpit = devlink_nl_cmd_region_get_dumpit,
|
.dumpit = devlink_nl_cmd_region_get_dumpit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
@ -5138,18 +5166,21 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_REGION_DEL,
|
.cmd = DEVLINK_CMD_REGION_DEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_region_del,
|
.doit = devlink_nl_cmd_region_del,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_REGION_READ,
|
.cmd = DEVLINK_CMD_REGION_READ,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.dumpit = devlink_nl_cmd_region_read_dumpit,
|
.dumpit = devlink_nl_cmd_region_read_dumpit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_INFO_GET,
|
.cmd = DEVLINK_CMD_INFO_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_info_get_doit,
|
.doit = devlink_nl_cmd_info_get_doit,
|
||||||
.dumpit = devlink_nl_cmd_info_get_dumpit,
|
.dumpit = devlink_nl_cmd_info_get_dumpit,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
@ -5157,6 +5188,7 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_HEALTH_REPORTER_GET,
|
.cmd = DEVLINK_CMD_HEALTH_REPORTER_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_health_reporter_get_doit,
|
.doit = devlink_nl_cmd_health_reporter_get_doit,
|
||||||
.dumpit = devlink_nl_cmd_health_reporter_get_dumpit,
|
.dumpit = devlink_nl_cmd_health_reporter_get_dumpit,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
@ -5164,24 +5196,28 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_HEALTH_REPORTER_SET,
|
.cmd = DEVLINK_CMD_HEALTH_REPORTER_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_health_reporter_set_doit,
|
.doit = devlink_nl_cmd_health_reporter_set_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_HEALTH_REPORTER_RECOVER,
|
.cmd = DEVLINK_CMD_HEALTH_REPORTER_RECOVER,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_health_reporter_recover_doit,
|
.doit = devlink_nl_cmd_health_reporter_recover_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE,
|
.cmd = DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_health_reporter_diagnose_doit,
|
.doit = devlink_nl_cmd_health_reporter_diagnose_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET,
|
.cmd = DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_health_reporter_dump_get_doit,
|
.doit = devlink_nl_cmd_health_reporter_dump_get_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
||||||
@ -5189,6 +5225,7 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR,
|
.cmd = DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_health_reporter_dump_clear_doit,
|
.doit = devlink_nl_cmd_health_reporter_dump_clear_doit,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK |
|
||||||
@ -5196,6 +5233,7 @@ static const struct genl_ops devlink_nl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = DEVLINK_CMD_FLASH_UPDATE,
|
.cmd = DEVLINK_CMD_FLASH_UPDATE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = devlink_nl_cmd_flash_update,
|
.doit = devlink_nl_cmd_flash_update,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
.internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK,
|
||||||
|
@ -355,14 +355,17 @@ static int dropmon_net_event(struct notifier_block *ev_block,
|
|||||||
static const struct genl_ops dropmon_ops[] = {
|
static const struct genl_ops dropmon_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = NET_DM_CMD_CONFIG,
|
.cmd = NET_DM_CMD_CONFIG,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = net_dm_cmd_config,
|
.doit = net_dm_cmd_config,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NET_DM_CMD_START,
|
.cmd = NET_DM_CMD_START,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = net_dm_cmd_trace,
|
.doit = net_dm_cmd_trace,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NET_DM_CMD_STOP,
|
.cmd = NET_DM_CMD_STOP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = net_dm_cmd_trace,
|
.doit = net_dm_cmd_trace,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -437,12 +437,14 @@ static int hsr_get_node_list(struct sk_buff *skb_in, struct genl_info *info)
|
|||||||
static const struct genl_ops hsr_ops[] = {
|
static const struct genl_ops hsr_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = HSR_C_GET_NODE_STATUS,
|
.cmd = HSR_C_GET_NODE_STATUS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.doit = hsr_get_node_status,
|
.doit = hsr_get_node_status,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = HSR_C_GET_NODE_LIST,
|
.cmd = HSR_C_GET_NODE_LIST,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.doit = hsr_get_node_list,
|
.doit = hsr_get_node_list,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
|
@ -2209,6 +2209,7 @@ static void nl802154_post_doit(const struct genl_ops *ops, struct sk_buff *skb,
|
|||||||
static const struct genl_ops nl802154_ops[] = {
|
static const struct genl_ops nl802154_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_GET_WPAN_PHY,
|
.cmd = NL802154_CMD_GET_WPAN_PHY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_get_wpan_phy,
|
.doit = nl802154_get_wpan_phy,
|
||||||
.dumpit = nl802154_dump_wpan_phy,
|
.dumpit = nl802154_dump_wpan_phy,
|
||||||
.done = nl802154_dump_wpan_phy_done,
|
.done = nl802154_dump_wpan_phy_done,
|
||||||
@ -2218,6 +2219,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_GET_INTERFACE,
|
.cmd = NL802154_CMD_GET_INTERFACE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_get_interface,
|
.doit = nl802154_get_interface,
|
||||||
.dumpit = nl802154_dump_interface,
|
.dumpit = nl802154_dump_interface,
|
||||||
/* can be retrieved by unprivileged users */
|
/* can be retrieved by unprivileged users */
|
||||||
@ -2226,6 +2228,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_NEW_INTERFACE,
|
.cmd = NL802154_CMD_NEW_INTERFACE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_new_interface,
|
.doit = nl802154_new_interface,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_WPAN_PHY |
|
.internal_flags = NL802154_FLAG_NEED_WPAN_PHY |
|
||||||
@ -2233,6 +2236,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_DEL_INTERFACE,
|
.cmd = NL802154_CMD_DEL_INTERFACE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_del_interface,
|
.doit = nl802154_del_interface,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_WPAN_DEV |
|
.internal_flags = NL802154_FLAG_NEED_WPAN_DEV |
|
||||||
@ -2240,6 +2244,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_SET_CHANNEL,
|
.cmd = NL802154_CMD_SET_CHANNEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_set_channel,
|
.doit = nl802154_set_channel,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_WPAN_PHY |
|
.internal_flags = NL802154_FLAG_NEED_WPAN_PHY |
|
||||||
@ -2247,6 +2252,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_SET_CCA_MODE,
|
.cmd = NL802154_CMD_SET_CCA_MODE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_set_cca_mode,
|
.doit = nl802154_set_cca_mode,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_WPAN_PHY |
|
.internal_flags = NL802154_FLAG_NEED_WPAN_PHY |
|
||||||
@ -2254,6 +2260,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_SET_CCA_ED_LEVEL,
|
.cmd = NL802154_CMD_SET_CCA_ED_LEVEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_set_cca_ed_level,
|
.doit = nl802154_set_cca_ed_level,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_WPAN_PHY |
|
.internal_flags = NL802154_FLAG_NEED_WPAN_PHY |
|
||||||
@ -2261,6 +2268,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_SET_TX_POWER,
|
.cmd = NL802154_CMD_SET_TX_POWER,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_set_tx_power,
|
.doit = nl802154_set_tx_power,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_WPAN_PHY |
|
.internal_flags = NL802154_FLAG_NEED_WPAN_PHY |
|
||||||
@ -2268,6 +2276,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_SET_WPAN_PHY_NETNS,
|
.cmd = NL802154_CMD_SET_WPAN_PHY_NETNS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_wpan_phy_netns,
|
.doit = nl802154_wpan_phy_netns,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_WPAN_PHY |
|
.internal_flags = NL802154_FLAG_NEED_WPAN_PHY |
|
||||||
@ -2275,6 +2284,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_SET_PAN_ID,
|
.cmd = NL802154_CMD_SET_PAN_ID,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_set_pan_id,
|
.doit = nl802154_set_pan_id,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
||||||
@ -2282,6 +2292,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_SET_SHORT_ADDR,
|
.cmd = NL802154_CMD_SET_SHORT_ADDR,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_set_short_addr,
|
.doit = nl802154_set_short_addr,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
||||||
@ -2289,6 +2300,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_SET_BACKOFF_EXPONENT,
|
.cmd = NL802154_CMD_SET_BACKOFF_EXPONENT,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_set_backoff_exponent,
|
.doit = nl802154_set_backoff_exponent,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
||||||
@ -2296,6 +2308,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_SET_MAX_CSMA_BACKOFFS,
|
.cmd = NL802154_CMD_SET_MAX_CSMA_BACKOFFS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_set_max_csma_backoffs,
|
.doit = nl802154_set_max_csma_backoffs,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
||||||
@ -2303,6 +2316,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_SET_MAX_FRAME_RETRIES,
|
.cmd = NL802154_CMD_SET_MAX_FRAME_RETRIES,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_set_max_frame_retries,
|
.doit = nl802154_set_max_frame_retries,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
||||||
@ -2310,6 +2324,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_SET_LBT_MODE,
|
.cmd = NL802154_CMD_SET_LBT_MODE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_set_lbt_mode,
|
.doit = nl802154_set_lbt_mode,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
||||||
@ -2317,6 +2332,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_SET_ACKREQ_DEFAULT,
|
.cmd = NL802154_CMD_SET_ACKREQ_DEFAULT,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_set_ackreq_default,
|
.doit = nl802154_set_ackreq_default,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
||||||
@ -2325,6 +2341,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
#ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL
|
#ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_SET_SEC_PARAMS,
|
.cmd = NL802154_CMD_SET_SEC_PARAMS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_set_llsec_params,
|
.doit = nl802154_set_llsec_params,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
||||||
@ -2332,6 +2349,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_GET_SEC_KEY,
|
.cmd = NL802154_CMD_GET_SEC_KEY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
/* TODO .doit by matching key id? */
|
/* TODO .doit by matching key id? */
|
||||||
.dumpit = nl802154_dump_llsec_key,
|
.dumpit = nl802154_dump_llsec_key,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
@ -2340,6 +2358,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_NEW_SEC_KEY,
|
.cmd = NL802154_CMD_NEW_SEC_KEY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_add_llsec_key,
|
.doit = nl802154_add_llsec_key,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
||||||
@ -2347,6 +2366,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_DEL_SEC_KEY,
|
.cmd = NL802154_CMD_DEL_SEC_KEY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_del_llsec_key,
|
.doit = nl802154_del_llsec_key,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
||||||
@ -2355,6 +2375,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
/* TODO unique identifier must short+pan OR extended_addr */
|
/* TODO unique identifier must short+pan OR extended_addr */
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_GET_SEC_DEV,
|
.cmd = NL802154_CMD_GET_SEC_DEV,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
/* TODO .doit by matching extended_addr? */
|
/* TODO .doit by matching extended_addr? */
|
||||||
.dumpit = nl802154_dump_llsec_dev,
|
.dumpit = nl802154_dump_llsec_dev,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
@ -2363,6 +2384,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_NEW_SEC_DEV,
|
.cmd = NL802154_CMD_NEW_SEC_DEV,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_add_llsec_dev,
|
.doit = nl802154_add_llsec_dev,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
||||||
@ -2370,6 +2392,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_DEL_SEC_DEV,
|
.cmd = NL802154_CMD_DEL_SEC_DEV,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_del_llsec_dev,
|
.doit = nl802154_del_llsec_dev,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
||||||
@ -2378,6 +2401,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
/* TODO remove complete devkey, put it as nested? */
|
/* TODO remove complete devkey, put it as nested? */
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_GET_SEC_DEVKEY,
|
.cmd = NL802154_CMD_GET_SEC_DEVKEY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
/* TODO doit by matching ??? */
|
/* TODO doit by matching ??? */
|
||||||
.dumpit = nl802154_dump_llsec_devkey,
|
.dumpit = nl802154_dump_llsec_devkey,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
@ -2386,6 +2410,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_NEW_SEC_DEVKEY,
|
.cmd = NL802154_CMD_NEW_SEC_DEVKEY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_add_llsec_devkey,
|
.doit = nl802154_add_llsec_devkey,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
||||||
@ -2393,6 +2418,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_DEL_SEC_DEVKEY,
|
.cmd = NL802154_CMD_DEL_SEC_DEVKEY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_del_llsec_devkey,
|
.doit = nl802154_del_llsec_devkey,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
||||||
@ -2400,6 +2426,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_GET_SEC_LEVEL,
|
.cmd = NL802154_CMD_GET_SEC_LEVEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
/* TODO .doit by matching frame_type? */
|
/* TODO .doit by matching frame_type? */
|
||||||
.dumpit = nl802154_dump_llsec_seclevel,
|
.dumpit = nl802154_dump_llsec_seclevel,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
@ -2408,6 +2435,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_NEW_SEC_LEVEL,
|
.cmd = NL802154_CMD_NEW_SEC_LEVEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl802154_add_llsec_seclevel,
|
.doit = nl802154_add_llsec_seclevel,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
.internal_flags = NL802154_FLAG_NEED_NETDEV |
|
||||||
@ -2415,6 +2443,7 @@ static const struct genl_ops nl802154_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL802154_CMD_DEL_SEC_LEVEL,
|
.cmd = NL802154_CMD_DEL_SEC_LEVEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
/* TODO match frame_type only? */
|
/* TODO match frame_type only? */
|
||||||
.doit = nl802154_del_llsec_seclevel,
|
.doit = nl802154_del_llsec_seclevel,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
|
@ -913,16 +913,19 @@ static int fou_nl_dump(struct sk_buff *skb, struct netlink_callback *cb)
|
|||||||
static const struct genl_ops fou_nl_ops[] = {
|
static const struct genl_ops fou_nl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = FOU_CMD_ADD,
|
.cmd = FOU_CMD_ADD,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = fou_nl_cmd_add_port,
|
.doit = fou_nl_cmd_add_port,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = FOU_CMD_DEL,
|
.cmd = FOU_CMD_DEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = fou_nl_cmd_rm_port,
|
.doit = fou_nl_cmd_rm_port,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = FOU_CMD_GET,
|
.cmd = FOU_CMD_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = fou_nl_cmd_get_port,
|
.doit = fou_nl_cmd_get_port,
|
||||||
.dumpit = fou_nl_dump,
|
.dumpit = fou_nl_dump,
|
||||||
},
|
},
|
||||||
|
@ -951,11 +951,13 @@ static int tcp_metrics_nl_cmd_del(struct sk_buff *skb, struct genl_info *info)
|
|||||||
static const struct genl_ops tcp_metrics_nl_ops[] = {
|
static const struct genl_ops tcp_metrics_nl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = TCP_METRICS_CMD_GET,
|
.cmd = TCP_METRICS_CMD_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tcp_metrics_nl_cmd_get,
|
.doit = tcp_metrics_nl_cmd_get,
|
||||||
.dumpit = tcp_metrics_nl_dump,
|
.dumpit = tcp_metrics_nl_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TCP_METRICS_CMD_DEL,
|
.cmd = TCP_METRICS_CMD_DEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tcp_metrics_nl_cmd_del,
|
.doit = tcp_metrics_nl_cmd_del,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
|
@ -16,21 +16,25 @@ static const struct nla_policy ila_nl_policy[ILA_ATTR_MAX + 1] = {
|
|||||||
static const struct genl_ops ila_nl_ops[] = {
|
static const struct genl_ops ila_nl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = ILA_CMD_ADD,
|
.cmd = ILA_CMD_ADD,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = ila_xlat_nl_cmd_add_mapping,
|
.doit = ila_xlat_nl_cmd_add_mapping,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = ILA_CMD_DEL,
|
.cmd = ILA_CMD_DEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = ila_xlat_nl_cmd_del_mapping,
|
.doit = ila_xlat_nl_cmd_del_mapping,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = ILA_CMD_FLUSH,
|
.cmd = ILA_CMD_FLUSH,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = ila_xlat_nl_cmd_flush,
|
.doit = ila_xlat_nl_cmd_flush,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = ILA_CMD_GET,
|
.cmd = ILA_CMD_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = ila_xlat_nl_cmd_get_mapping,
|
.doit = ila_xlat_nl_cmd_get_mapping,
|
||||||
.start = ila_xlat_nl_dump_start,
|
.start = ila_xlat_nl_dump_start,
|
||||||
.dumpit = ila_xlat_nl_dump,
|
.dumpit = ila_xlat_nl_dump,
|
||||||
|
@ -398,11 +398,13 @@ static struct pernet_operations ip6_segments_ops = {
|
|||||||
static const struct genl_ops seg6_genl_ops[] = {
|
static const struct genl_ops seg6_genl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = SEG6_CMD_SETHMAC,
|
.cmd = SEG6_CMD_SETHMAC,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = seg6_genl_sethmac,
|
.doit = seg6_genl_sethmac,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = SEG6_CMD_DUMPHMAC,
|
.cmd = SEG6_CMD_DUMPHMAC,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.start = seg6_genl_dumphmac_start,
|
.start = seg6_genl_dumphmac_start,
|
||||||
.dumpit = seg6_genl_dumphmac,
|
.dumpit = seg6_genl_dumphmac,
|
||||||
.done = seg6_genl_dumphmac_done,
|
.done = seg6_genl_dumphmac_done,
|
||||||
@ -410,11 +412,13 @@ static const struct genl_ops seg6_genl_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = SEG6_CMD_SET_TUNSRC,
|
.cmd = SEG6_CMD_SET_TUNSRC,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = seg6_genl_set_tunsrc,
|
.doit = seg6_genl_set_tunsrc,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = SEG6_CMD_GET_TUNSRC,
|
.cmd = SEG6_CMD_GET_TUNSRC,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = seg6_genl_get_tunsrc,
|
.doit = seg6_genl_get_tunsrc,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
|
@ -915,47 +915,56 @@ static const struct nla_policy l2tp_nl_policy[L2TP_ATTR_MAX + 1] = {
|
|||||||
static const struct genl_ops l2tp_nl_ops[] = {
|
static const struct genl_ops l2tp_nl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = L2TP_CMD_NOOP,
|
.cmd = L2TP_CMD_NOOP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = l2tp_nl_cmd_noop,
|
.doit = l2tp_nl_cmd_noop,
|
||||||
/* can be retrieved by unprivileged users */
|
/* can be retrieved by unprivileged users */
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = L2TP_CMD_TUNNEL_CREATE,
|
.cmd = L2TP_CMD_TUNNEL_CREATE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = l2tp_nl_cmd_tunnel_create,
|
.doit = l2tp_nl_cmd_tunnel_create,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = L2TP_CMD_TUNNEL_DELETE,
|
.cmd = L2TP_CMD_TUNNEL_DELETE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = l2tp_nl_cmd_tunnel_delete,
|
.doit = l2tp_nl_cmd_tunnel_delete,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = L2TP_CMD_TUNNEL_MODIFY,
|
.cmd = L2TP_CMD_TUNNEL_MODIFY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = l2tp_nl_cmd_tunnel_modify,
|
.doit = l2tp_nl_cmd_tunnel_modify,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = L2TP_CMD_TUNNEL_GET,
|
.cmd = L2TP_CMD_TUNNEL_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = l2tp_nl_cmd_tunnel_get,
|
.doit = l2tp_nl_cmd_tunnel_get,
|
||||||
.dumpit = l2tp_nl_cmd_tunnel_dump,
|
.dumpit = l2tp_nl_cmd_tunnel_dump,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = L2TP_CMD_SESSION_CREATE,
|
.cmd = L2TP_CMD_SESSION_CREATE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = l2tp_nl_cmd_session_create,
|
.doit = l2tp_nl_cmd_session_create,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = L2TP_CMD_SESSION_DELETE,
|
.cmd = L2TP_CMD_SESSION_DELETE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = l2tp_nl_cmd_session_delete,
|
.doit = l2tp_nl_cmd_session_delete,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = L2TP_CMD_SESSION_MODIFY,
|
.cmd = L2TP_CMD_SESSION_MODIFY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = l2tp_nl_cmd_session_modify,
|
.doit = l2tp_nl_cmd_session_modify,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = L2TP_CMD_SESSION_GET,
|
.cmd = L2TP_CMD_SESSION_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = l2tp_nl_cmd_session_get,
|
.doit = l2tp_nl_cmd_session_get,
|
||||||
.dumpit = l2tp_nl_cmd_session_dump,
|
.dumpit = l2tp_nl_cmd_session_dump,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
|
@ -723,32 +723,38 @@ static int ncsi_set_channel_mask_nl(struct sk_buff *msg,
|
|||||||
static const struct genl_ops ncsi_ops[] = {
|
static const struct genl_ops ncsi_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = NCSI_CMD_PKG_INFO,
|
.cmd = NCSI_CMD_PKG_INFO,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = ncsi_pkg_info_nl,
|
.doit = ncsi_pkg_info_nl,
|
||||||
.dumpit = ncsi_pkg_info_all_nl,
|
.dumpit = ncsi_pkg_info_all_nl,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NCSI_CMD_SET_INTERFACE,
|
.cmd = NCSI_CMD_SET_INTERFACE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = ncsi_set_interface_nl,
|
.doit = ncsi_set_interface_nl,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NCSI_CMD_CLEAR_INTERFACE,
|
.cmd = NCSI_CMD_CLEAR_INTERFACE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = ncsi_clear_interface_nl,
|
.doit = ncsi_clear_interface_nl,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NCSI_CMD_SEND_CMD,
|
.cmd = NCSI_CMD_SEND_CMD,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = ncsi_send_cmd_nl,
|
.doit = ncsi_send_cmd_nl,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NCSI_CMD_SET_PACKAGE_MASK,
|
.cmd = NCSI_CMD_SET_PACKAGE_MASK,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = ncsi_set_package_mask_nl,
|
.doit = ncsi_set_package_mask_nl,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NCSI_CMD_SET_CHANNEL_MASK,
|
.cmd = NCSI_CMD_SET_CHANNEL_MASK,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = ncsi_set_channel_mask_nl,
|
.doit = ncsi_set_channel_mask_nl,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
|
@ -3802,82 +3802,98 @@ static int ip_vs_genl_get_cmd(struct sk_buff *skb, struct genl_info *info)
|
|||||||
static const struct genl_ops ip_vs_genl_ops[] = {
|
static const struct genl_ops ip_vs_genl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_NEW_SERVICE,
|
.cmd = IPVS_CMD_NEW_SERVICE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = ip_vs_genl_set_cmd,
|
.doit = ip_vs_genl_set_cmd,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_SET_SERVICE,
|
.cmd = IPVS_CMD_SET_SERVICE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = ip_vs_genl_set_cmd,
|
.doit = ip_vs_genl_set_cmd,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_DEL_SERVICE,
|
.cmd = IPVS_CMD_DEL_SERVICE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = ip_vs_genl_set_cmd,
|
.doit = ip_vs_genl_set_cmd,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_GET_SERVICE,
|
.cmd = IPVS_CMD_GET_SERVICE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = ip_vs_genl_get_cmd,
|
.doit = ip_vs_genl_get_cmd,
|
||||||
.dumpit = ip_vs_genl_dump_services,
|
.dumpit = ip_vs_genl_dump_services,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_NEW_DEST,
|
.cmd = IPVS_CMD_NEW_DEST,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = ip_vs_genl_set_cmd,
|
.doit = ip_vs_genl_set_cmd,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_SET_DEST,
|
.cmd = IPVS_CMD_SET_DEST,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = ip_vs_genl_set_cmd,
|
.doit = ip_vs_genl_set_cmd,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_DEL_DEST,
|
.cmd = IPVS_CMD_DEL_DEST,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = ip_vs_genl_set_cmd,
|
.doit = ip_vs_genl_set_cmd,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_GET_DEST,
|
.cmd = IPVS_CMD_GET_DEST,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.dumpit = ip_vs_genl_dump_dests,
|
.dumpit = ip_vs_genl_dump_dests,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_NEW_DAEMON,
|
.cmd = IPVS_CMD_NEW_DAEMON,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = ip_vs_genl_set_daemon,
|
.doit = ip_vs_genl_set_daemon,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_DEL_DAEMON,
|
.cmd = IPVS_CMD_DEL_DAEMON,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = ip_vs_genl_set_daemon,
|
.doit = ip_vs_genl_set_daemon,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_GET_DAEMON,
|
.cmd = IPVS_CMD_GET_DAEMON,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.dumpit = ip_vs_genl_dump_daemons,
|
.dumpit = ip_vs_genl_dump_daemons,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_SET_CONFIG,
|
.cmd = IPVS_CMD_SET_CONFIG,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = ip_vs_genl_set_cmd,
|
.doit = ip_vs_genl_set_cmd,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_GET_CONFIG,
|
.cmd = IPVS_CMD_GET_CONFIG,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = ip_vs_genl_get_cmd,
|
.doit = ip_vs_genl_get_cmd,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_GET_INFO,
|
.cmd = IPVS_CMD_GET_INFO,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = ip_vs_genl_get_cmd,
|
.doit = ip_vs_genl_get_cmd,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_ZERO,
|
.cmd = IPVS_CMD_ZERO,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = ip_vs_genl_set_cmd,
|
.doit = ip_vs_genl_set_cmd,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = IPVS_CMD_FLUSH,
|
.cmd = IPVS_CMD_FLUSH,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = ip_vs_genl_set_cmd,
|
.doit = ip_vs_genl_set_cmd,
|
||||||
},
|
},
|
||||||
|
@ -321,24 +321,28 @@ static int netlbl_calipso_remove(struct sk_buff *skb, struct genl_info *info)
|
|||||||
static const struct genl_ops netlbl_calipso_ops[] = {
|
static const struct genl_ops netlbl_calipso_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = NLBL_CALIPSO_C_ADD,
|
.cmd = NLBL_CALIPSO_C_ADD,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = netlbl_calipso_add,
|
.doit = netlbl_calipso_add,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_CALIPSO_C_REMOVE,
|
.cmd = NLBL_CALIPSO_C_REMOVE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = netlbl_calipso_remove,
|
.doit = netlbl_calipso_remove,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_CALIPSO_C_LIST,
|
.cmd = NLBL_CALIPSO_C_LIST,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.doit = netlbl_calipso_list,
|
.doit = netlbl_calipso_list,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_CALIPSO_C_LISTALL,
|
.cmd = NLBL_CALIPSO_C_LISTALL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.doit = NULL,
|
.doit = NULL,
|
||||||
.dumpit = netlbl_calipso_listall,
|
.dumpit = netlbl_calipso_listall,
|
||||||
|
@ -741,24 +741,28 @@ static int netlbl_cipsov4_remove(struct sk_buff *skb, struct genl_info *info)
|
|||||||
static const struct genl_ops netlbl_cipsov4_ops[] = {
|
static const struct genl_ops netlbl_cipsov4_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = NLBL_CIPSOV4_C_ADD,
|
.cmd = NLBL_CIPSOV4_C_ADD,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = netlbl_cipsov4_add,
|
.doit = netlbl_cipsov4_add,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_CIPSOV4_C_REMOVE,
|
.cmd = NLBL_CIPSOV4_C_REMOVE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = netlbl_cipsov4_remove,
|
.doit = netlbl_cipsov4_remove,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_CIPSOV4_C_LIST,
|
.cmd = NLBL_CIPSOV4_C_LIST,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.doit = netlbl_cipsov4_list,
|
.doit = netlbl_cipsov4_list,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_CIPSOV4_C_LISTALL,
|
.cmd = NLBL_CIPSOV4_C_LISTALL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.doit = NULL,
|
.doit = NULL,
|
||||||
.dumpit = netlbl_cipsov4_listall,
|
.dumpit = netlbl_cipsov4_listall,
|
||||||
|
@ -774,48 +774,56 @@ static int netlbl_mgmt_version(struct sk_buff *skb, struct genl_info *info)
|
|||||||
static const struct genl_ops netlbl_mgmt_genl_ops[] = {
|
static const struct genl_ops netlbl_mgmt_genl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = NLBL_MGMT_C_ADD,
|
.cmd = NLBL_MGMT_C_ADD,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = netlbl_mgmt_add,
|
.doit = netlbl_mgmt_add,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_MGMT_C_REMOVE,
|
.cmd = NLBL_MGMT_C_REMOVE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = netlbl_mgmt_remove,
|
.doit = netlbl_mgmt_remove,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_MGMT_C_LISTALL,
|
.cmd = NLBL_MGMT_C_LISTALL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.doit = NULL,
|
.doit = NULL,
|
||||||
.dumpit = netlbl_mgmt_listall,
|
.dumpit = netlbl_mgmt_listall,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_MGMT_C_ADDDEF,
|
.cmd = NLBL_MGMT_C_ADDDEF,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = netlbl_mgmt_adddef,
|
.doit = netlbl_mgmt_adddef,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_MGMT_C_REMOVEDEF,
|
.cmd = NLBL_MGMT_C_REMOVEDEF,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = netlbl_mgmt_removedef,
|
.doit = netlbl_mgmt_removedef,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_MGMT_C_LISTDEF,
|
.cmd = NLBL_MGMT_C_LISTDEF,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.doit = netlbl_mgmt_listdef,
|
.doit = netlbl_mgmt_listdef,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_MGMT_C_PROTOCOLS,
|
.cmd = NLBL_MGMT_C_PROTOCOLS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.doit = NULL,
|
.doit = NULL,
|
||||||
.dumpit = netlbl_mgmt_protocols,
|
.dumpit = netlbl_mgmt_protocols,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_MGMT_C_VERSION,
|
.cmd = NLBL_MGMT_C_VERSION,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.doit = netlbl_mgmt_version,
|
.doit = netlbl_mgmt_version,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
|
@ -1317,48 +1317,56 @@ static int netlbl_unlabel_staticlistdef(struct sk_buff *skb,
|
|||||||
static const struct genl_ops netlbl_unlabel_genl_ops[] = {
|
static const struct genl_ops netlbl_unlabel_genl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = NLBL_UNLABEL_C_STATICADD,
|
.cmd = NLBL_UNLABEL_C_STATICADD,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = netlbl_unlabel_staticadd,
|
.doit = netlbl_unlabel_staticadd,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_UNLABEL_C_STATICREMOVE,
|
.cmd = NLBL_UNLABEL_C_STATICREMOVE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = netlbl_unlabel_staticremove,
|
.doit = netlbl_unlabel_staticremove,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_UNLABEL_C_STATICLIST,
|
.cmd = NLBL_UNLABEL_C_STATICLIST,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.doit = NULL,
|
.doit = NULL,
|
||||||
.dumpit = netlbl_unlabel_staticlist,
|
.dumpit = netlbl_unlabel_staticlist,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_UNLABEL_C_STATICADDDEF,
|
.cmd = NLBL_UNLABEL_C_STATICADDDEF,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = netlbl_unlabel_staticadddef,
|
.doit = netlbl_unlabel_staticadddef,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_UNLABEL_C_STATICREMOVEDEF,
|
.cmd = NLBL_UNLABEL_C_STATICREMOVEDEF,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = netlbl_unlabel_staticremovedef,
|
.doit = netlbl_unlabel_staticremovedef,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_UNLABEL_C_STATICLISTDEF,
|
.cmd = NLBL_UNLABEL_C_STATICLISTDEF,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.doit = NULL,
|
.doit = NULL,
|
||||||
.dumpit = netlbl_unlabel_staticlistdef,
|
.dumpit = netlbl_unlabel_staticlistdef,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_UNLABEL_C_ACCEPT,
|
.cmd = NLBL_UNLABEL_C_ACCEPT,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = netlbl_unlabel_accept,
|
.doit = netlbl_unlabel_accept,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NLBL_UNLABEL_C_LIST,
|
.cmd = NLBL_UNLABEL_C_LIST,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.doit = netlbl_unlabel_list,
|
.doit = netlbl_unlabel_list,
|
||||||
.dumpit = NULL,
|
.dumpit = NULL,
|
||||||
|
@ -536,6 +536,24 @@ static int genl_family_rcv_msg(const struct genl_family *family,
|
|||||||
if (ops->dumpit == NULL)
|
if (ops->dumpit == NULL)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
|
if (!(ops->validate & GENL_DONT_VALIDATE_DUMP)) {
|
||||||
|
unsigned int validate = NL_VALIDATE_STRICT;
|
||||||
|
int hdrlen = GENL_HDRLEN + family->hdrsize;
|
||||||
|
|
||||||
|
if (ops->validate & GENL_DONT_VALIDATE_DUMP_STRICT)
|
||||||
|
validate = NL_VALIDATE_LIBERAL;
|
||||||
|
|
||||||
|
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
rc = __nla_validate(nlmsg_attrdata(nlh, hdrlen),
|
||||||
|
nlmsg_attrlen(nlh, hdrlen),
|
||||||
|
family->maxattr, family->policy,
|
||||||
|
validate, extack);
|
||||||
|
if (rc)
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
if (!family->parallel_ops) {
|
if (!family->parallel_ops) {
|
||||||
struct netlink_dump_control c = {
|
struct netlink_dump_control c = {
|
||||||
.module = family->module,
|
.module = family->module,
|
||||||
@ -577,9 +595,13 @@ static int genl_family_rcv_msg(const struct genl_family *family,
|
|||||||
attrbuf = family->attrbuf;
|
attrbuf = family->attrbuf;
|
||||||
|
|
||||||
if (attrbuf) {
|
if (attrbuf) {
|
||||||
err = nlmsg_parse_deprecated(nlh, hdrlen, attrbuf,
|
enum netlink_validation validate = NL_VALIDATE_STRICT;
|
||||||
family->maxattr, family->policy,
|
|
||||||
extack);
|
if (ops->validate & GENL_DONT_VALIDATE_STRICT)
|
||||||
|
validate = NL_VALIDATE_LIBERAL;
|
||||||
|
|
||||||
|
err = __nlmsg_parse(nlh, hdrlen, attrbuf, family->maxattr,
|
||||||
|
family->policy, validate, extack);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -939,6 +961,7 @@ static int genl_ctrl_event(int event, const struct genl_family *family,
|
|||||||
static const struct genl_ops genl_ctrl_ops[] = {
|
static const struct genl_ops genl_ctrl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = CTRL_CMD_GETFAMILY,
|
.cmd = CTRL_CMD_GETFAMILY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = ctrl_getfamily,
|
.doit = ctrl_getfamily,
|
||||||
.dumpit = ctrl_dumpfamily,
|
.dumpit = ctrl_dumpfamily,
|
||||||
},
|
},
|
||||||
|
@ -1669,82 +1669,101 @@ EXPORT_SYMBOL(nfc_vendor_cmd_reply);
|
|||||||
static const struct genl_ops nfc_genl_ops[] = {
|
static const struct genl_ops nfc_genl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_GET_DEVICE,
|
.cmd = NFC_CMD_GET_DEVICE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_get_device,
|
.doit = nfc_genl_get_device,
|
||||||
.dumpit = nfc_genl_dump_devices,
|
.dumpit = nfc_genl_dump_devices,
|
||||||
.done = nfc_genl_dump_devices_done,
|
.done = nfc_genl_dump_devices_done,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_DEV_UP,
|
.cmd = NFC_CMD_DEV_UP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_dev_up,
|
.doit = nfc_genl_dev_up,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_DEV_DOWN,
|
.cmd = NFC_CMD_DEV_DOWN,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_dev_down,
|
.doit = nfc_genl_dev_down,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_START_POLL,
|
.cmd = NFC_CMD_START_POLL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_start_poll,
|
.doit = nfc_genl_start_poll,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_STOP_POLL,
|
.cmd = NFC_CMD_STOP_POLL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_stop_poll,
|
.doit = nfc_genl_stop_poll,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_DEP_LINK_UP,
|
.cmd = NFC_CMD_DEP_LINK_UP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_dep_link_up,
|
.doit = nfc_genl_dep_link_up,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_DEP_LINK_DOWN,
|
.cmd = NFC_CMD_DEP_LINK_DOWN,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_dep_link_down,
|
.doit = nfc_genl_dep_link_down,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_GET_TARGET,
|
.cmd = NFC_CMD_GET_TARGET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.dumpit = nfc_genl_dump_targets,
|
.dumpit = nfc_genl_dump_targets,
|
||||||
.done = nfc_genl_dump_targets_done,
|
.done = nfc_genl_dump_targets_done,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_LLC_GET_PARAMS,
|
.cmd = NFC_CMD_LLC_GET_PARAMS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_llc_get_params,
|
.doit = nfc_genl_llc_get_params,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_LLC_SET_PARAMS,
|
.cmd = NFC_CMD_LLC_SET_PARAMS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_llc_set_params,
|
.doit = nfc_genl_llc_set_params,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_LLC_SDREQ,
|
.cmd = NFC_CMD_LLC_SDREQ,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_llc_sdreq,
|
.doit = nfc_genl_llc_sdreq,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_FW_DOWNLOAD,
|
.cmd = NFC_CMD_FW_DOWNLOAD,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_fw_download,
|
.doit = nfc_genl_fw_download,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_ENABLE_SE,
|
.cmd = NFC_CMD_ENABLE_SE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_enable_se,
|
.doit = nfc_genl_enable_se,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_DISABLE_SE,
|
.cmd = NFC_CMD_DISABLE_SE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_disable_se,
|
.doit = nfc_genl_disable_se,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_GET_SE,
|
.cmd = NFC_CMD_GET_SE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.dumpit = nfc_genl_dump_ses,
|
.dumpit = nfc_genl_dump_ses,
|
||||||
.done = nfc_genl_dump_ses_done,
|
.done = nfc_genl_dump_ses_done,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_SE_IO,
|
.cmd = NFC_CMD_SE_IO,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_se_io,
|
.doit = nfc_genl_se_io,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_ACTIVATE_TARGET,
|
.cmd = NFC_CMD_ACTIVATE_TARGET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_activate_target,
|
.doit = nfc_genl_activate_target,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_VENDOR,
|
.cmd = NFC_CMD_VENDOR,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_vendor_cmd,
|
.doit = nfc_genl_vendor_cmd,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NFC_CMD_DEACTIVATE_TARGET,
|
.cmd = NFC_CMD_DEACTIVATE_TARGET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nfc_genl_deactivate_target,
|
.doit = nfc_genl_deactivate_target,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -2186,16 +2186,19 @@ static int ovs_ct_limit_cmd_get(struct sk_buff *skb, struct genl_info *info)
|
|||||||
|
|
||||||
static struct genl_ops ct_limit_genl_ops[] = {
|
static struct genl_ops ct_limit_genl_ops[] = {
|
||||||
{ .cmd = OVS_CT_LIMIT_CMD_SET,
|
{ .cmd = OVS_CT_LIMIT_CMD_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN
|
.flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN
|
||||||
* privilege. */
|
* privilege. */
|
||||||
.doit = ovs_ct_limit_cmd_set,
|
.doit = ovs_ct_limit_cmd_set,
|
||||||
},
|
},
|
||||||
{ .cmd = OVS_CT_LIMIT_CMD_DEL,
|
{ .cmd = OVS_CT_LIMIT_CMD_DEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN
|
.flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN
|
||||||
* privilege. */
|
* privilege. */
|
||||||
.doit = ovs_ct_limit_cmd_del,
|
.doit = ovs_ct_limit_cmd_del,
|
||||||
},
|
},
|
||||||
{ .cmd = OVS_CT_LIMIT_CMD_GET,
|
{ .cmd = OVS_CT_LIMIT_CMD_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0, /* OK for unprivileged users. */
|
.flags = 0, /* OK for unprivileged users. */
|
||||||
.doit = ovs_ct_limit_cmd_get,
|
.doit = ovs_ct_limit_cmd_get,
|
||||||
},
|
},
|
||||||
|
@ -639,6 +639,7 @@ static const struct nla_policy packet_policy[OVS_PACKET_ATTR_MAX + 1] = {
|
|||||||
|
|
||||||
static const struct genl_ops dp_packet_genl_ops[] = {
|
static const struct genl_ops dp_packet_genl_ops[] = {
|
||||||
{ .cmd = OVS_PACKET_CMD_EXECUTE,
|
{ .cmd = OVS_PACKET_CMD_EXECUTE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
||||||
.doit = ovs_packet_cmd_execute
|
.doit = ovs_packet_cmd_execute
|
||||||
}
|
}
|
||||||
@ -1424,19 +1425,23 @@ static const struct nla_policy flow_policy[OVS_FLOW_ATTR_MAX + 1] = {
|
|||||||
|
|
||||||
static const struct genl_ops dp_flow_genl_ops[] = {
|
static const struct genl_ops dp_flow_genl_ops[] = {
|
||||||
{ .cmd = OVS_FLOW_CMD_NEW,
|
{ .cmd = OVS_FLOW_CMD_NEW,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
||||||
.doit = ovs_flow_cmd_new
|
.doit = ovs_flow_cmd_new
|
||||||
},
|
},
|
||||||
{ .cmd = OVS_FLOW_CMD_DEL,
|
{ .cmd = OVS_FLOW_CMD_DEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
||||||
.doit = ovs_flow_cmd_del
|
.doit = ovs_flow_cmd_del
|
||||||
},
|
},
|
||||||
{ .cmd = OVS_FLOW_CMD_GET,
|
{ .cmd = OVS_FLOW_CMD_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0, /* OK for unprivileged users. */
|
.flags = 0, /* OK for unprivileged users. */
|
||||||
.doit = ovs_flow_cmd_get,
|
.doit = ovs_flow_cmd_get,
|
||||||
.dumpit = ovs_flow_cmd_dump
|
.dumpit = ovs_flow_cmd_dump
|
||||||
},
|
},
|
||||||
{ .cmd = OVS_FLOW_CMD_SET,
|
{ .cmd = OVS_FLOW_CMD_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
||||||
.doit = ovs_flow_cmd_set,
|
.doit = ovs_flow_cmd_set,
|
||||||
},
|
},
|
||||||
@ -1814,19 +1819,23 @@ static const struct nla_policy datapath_policy[OVS_DP_ATTR_MAX + 1] = {
|
|||||||
|
|
||||||
static const struct genl_ops dp_datapath_genl_ops[] = {
|
static const struct genl_ops dp_datapath_genl_ops[] = {
|
||||||
{ .cmd = OVS_DP_CMD_NEW,
|
{ .cmd = OVS_DP_CMD_NEW,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
||||||
.doit = ovs_dp_cmd_new
|
.doit = ovs_dp_cmd_new
|
||||||
},
|
},
|
||||||
{ .cmd = OVS_DP_CMD_DEL,
|
{ .cmd = OVS_DP_CMD_DEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
||||||
.doit = ovs_dp_cmd_del
|
.doit = ovs_dp_cmd_del
|
||||||
},
|
},
|
||||||
{ .cmd = OVS_DP_CMD_GET,
|
{ .cmd = OVS_DP_CMD_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0, /* OK for unprivileged users. */
|
.flags = 0, /* OK for unprivileged users. */
|
||||||
.doit = ovs_dp_cmd_get,
|
.doit = ovs_dp_cmd_get,
|
||||||
.dumpit = ovs_dp_cmd_dump
|
.dumpit = ovs_dp_cmd_dump
|
||||||
},
|
},
|
||||||
{ .cmd = OVS_DP_CMD_SET,
|
{ .cmd = OVS_DP_CMD_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
||||||
.doit = ovs_dp_cmd_set,
|
.doit = ovs_dp_cmd_set,
|
||||||
},
|
},
|
||||||
@ -2254,19 +2263,23 @@ static const struct nla_policy vport_policy[OVS_VPORT_ATTR_MAX + 1] = {
|
|||||||
|
|
||||||
static const struct genl_ops dp_vport_genl_ops[] = {
|
static const struct genl_ops dp_vport_genl_ops[] = {
|
||||||
{ .cmd = OVS_VPORT_CMD_NEW,
|
{ .cmd = OVS_VPORT_CMD_NEW,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
||||||
.doit = ovs_vport_cmd_new
|
.doit = ovs_vport_cmd_new
|
||||||
},
|
},
|
||||||
{ .cmd = OVS_VPORT_CMD_DEL,
|
{ .cmd = OVS_VPORT_CMD_DEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
||||||
.doit = ovs_vport_cmd_del
|
.doit = ovs_vport_cmd_del
|
||||||
},
|
},
|
||||||
{ .cmd = OVS_VPORT_CMD_GET,
|
{ .cmd = OVS_VPORT_CMD_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0, /* OK for unprivileged users. */
|
.flags = 0, /* OK for unprivileged users. */
|
||||||
.doit = ovs_vport_cmd_get,
|
.doit = ovs_vport_cmd_get,
|
||||||
.dumpit = ovs_vport_cmd_dump
|
.dumpit = ovs_vport_cmd_dump
|
||||||
},
|
},
|
||||||
{ .cmd = OVS_VPORT_CMD_SET,
|
{ .cmd = OVS_VPORT_CMD_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
.flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */
|
||||||
.doit = ovs_vport_cmd_set,
|
.doit = ovs_vport_cmd_set,
|
||||||
},
|
},
|
||||||
|
@ -526,20 +526,24 @@ bool ovs_meter_execute(struct datapath *dp, struct sk_buff *skb,
|
|||||||
|
|
||||||
static struct genl_ops dp_meter_genl_ops[] = {
|
static struct genl_ops dp_meter_genl_ops[] = {
|
||||||
{ .cmd = OVS_METER_CMD_FEATURES,
|
{ .cmd = OVS_METER_CMD_FEATURES,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0, /* OK for unprivileged users. */
|
.flags = 0, /* OK for unprivileged users. */
|
||||||
.doit = ovs_meter_cmd_features
|
.doit = ovs_meter_cmd_features
|
||||||
},
|
},
|
||||||
{ .cmd = OVS_METER_CMD_SET,
|
{ .cmd = OVS_METER_CMD_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN
|
.flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN
|
||||||
* privilege.
|
* privilege.
|
||||||
*/
|
*/
|
||||||
.doit = ovs_meter_cmd_set,
|
.doit = ovs_meter_cmd_set,
|
||||||
},
|
},
|
||||||
{ .cmd = OVS_METER_CMD_GET,
|
{ .cmd = OVS_METER_CMD_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = 0, /* OK for unprivileged users. */
|
.flags = 0, /* OK for unprivileged users. */
|
||||||
.doit = ovs_meter_cmd_get,
|
.doit = ovs_meter_cmd_get,
|
||||||
},
|
},
|
||||||
{ .cmd = OVS_METER_CMD_DEL,
|
{ .cmd = OVS_METER_CMD_DEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN
|
.flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN
|
||||||
* privilege.
|
* privilege.
|
||||||
*/
|
*/
|
||||||
|
@ -100,6 +100,7 @@ static int psample_nl_cmd_get_group_dumpit(struct sk_buff *msg,
|
|||||||
static const struct genl_ops psample_nl_ops[] = {
|
static const struct genl_ops psample_nl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = PSAMPLE_CMD_GET_GROUP,
|
.cmd = PSAMPLE_CMD_GET_GROUP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.dumpit = psample_nl_cmd_get_group_dumpit,
|
.dumpit = psample_nl_cmd_get_group_dumpit,
|
||||||
/* can be retrieved by unprivileged users */
|
/* can be retrieved by unprivileged users */
|
||||||
}
|
}
|
||||||
|
@ -612,6 +612,7 @@ static int smc_pnet_flush(struct sk_buff *skb, struct genl_info *info)
|
|||||||
static const struct genl_ops smc_pnet_ops[] = {
|
static const struct genl_ops smc_pnet_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = SMC_PNETID_GET,
|
.cmd = SMC_PNETID_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = smc_pnet_get,
|
.doit = smc_pnet_get,
|
||||||
.dumpit = smc_pnet_dump,
|
.dumpit = smc_pnet_dump,
|
||||||
@ -619,16 +620,19 @@ static const struct genl_ops smc_pnet_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = SMC_PNETID_ADD,
|
.cmd = SMC_PNETID_ADD,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = smc_pnet_add
|
.doit = smc_pnet_add
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = SMC_PNETID_DEL,
|
.cmd = SMC_PNETID_DEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = smc_pnet_del
|
.doit = smc_pnet_del
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = SMC_PNETID_FLUSH,
|
.cmd = SMC_PNETID_FLUSH,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = smc_pnet_flush
|
.doit = smc_pnet_flush
|
||||||
}
|
}
|
||||||
|
@ -143,93 +143,114 @@ const struct nla_policy tipc_nl_udp_policy[TIPC_NLA_UDP_MAX + 1] = {
|
|||||||
static const struct genl_ops tipc_genl_v2_ops[] = {
|
static const struct genl_ops tipc_genl_v2_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_BEARER_DISABLE,
|
.cmd = TIPC_NL_BEARER_DISABLE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tipc_nl_bearer_disable,
|
.doit = tipc_nl_bearer_disable,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_BEARER_ENABLE,
|
.cmd = TIPC_NL_BEARER_ENABLE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tipc_nl_bearer_enable,
|
.doit = tipc_nl_bearer_enable,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_BEARER_GET,
|
.cmd = TIPC_NL_BEARER_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tipc_nl_bearer_get,
|
.doit = tipc_nl_bearer_get,
|
||||||
.dumpit = tipc_nl_bearer_dump,
|
.dumpit = tipc_nl_bearer_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_BEARER_ADD,
|
.cmd = TIPC_NL_BEARER_ADD,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tipc_nl_bearer_add,
|
.doit = tipc_nl_bearer_add,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_BEARER_SET,
|
.cmd = TIPC_NL_BEARER_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tipc_nl_bearer_set,
|
.doit = tipc_nl_bearer_set,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_SOCK_GET,
|
.cmd = TIPC_NL_SOCK_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.start = tipc_dump_start,
|
.start = tipc_dump_start,
|
||||||
.dumpit = tipc_nl_sk_dump,
|
.dumpit = tipc_nl_sk_dump,
|
||||||
.done = tipc_dump_done,
|
.done = tipc_dump_done,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_PUBL_GET,
|
.cmd = TIPC_NL_PUBL_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.dumpit = tipc_nl_publ_dump,
|
.dumpit = tipc_nl_publ_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_LINK_GET,
|
.cmd = TIPC_NL_LINK_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tipc_nl_node_get_link,
|
.doit = tipc_nl_node_get_link,
|
||||||
.dumpit = tipc_nl_node_dump_link,
|
.dumpit = tipc_nl_node_dump_link,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_LINK_SET,
|
.cmd = TIPC_NL_LINK_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tipc_nl_node_set_link,
|
.doit = tipc_nl_node_set_link,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_LINK_RESET_STATS,
|
.cmd = TIPC_NL_LINK_RESET_STATS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tipc_nl_node_reset_link_stats,
|
.doit = tipc_nl_node_reset_link_stats,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_MEDIA_GET,
|
.cmd = TIPC_NL_MEDIA_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tipc_nl_media_get,
|
.doit = tipc_nl_media_get,
|
||||||
.dumpit = tipc_nl_media_dump,
|
.dumpit = tipc_nl_media_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_MEDIA_SET,
|
.cmd = TIPC_NL_MEDIA_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tipc_nl_media_set,
|
.doit = tipc_nl_media_set,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_NODE_GET,
|
.cmd = TIPC_NL_NODE_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.dumpit = tipc_nl_node_dump,
|
.dumpit = tipc_nl_node_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_NET_GET,
|
.cmd = TIPC_NL_NET_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.dumpit = tipc_nl_net_dump,
|
.dumpit = tipc_nl_net_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_NET_SET,
|
.cmd = TIPC_NL_NET_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tipc_nl_net_set,
|
.doit = tipc_nl_net_set,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_NAME_TABLE_GET,
|
.cmd = TIPC_NL_NAME_TABLE_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.dumpit = tipc_nl_name_table_dump,
|
.dumpit = tipc_nl_name_table_dump,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_MON_SET,
|
.cmd = TIPC_NL_MON_SET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tipc_nl_node_set_monitor,
|
.doit = tipc_nl_node_set_monitor,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_MON_GET,
|
.cmd = TIPC_NL_MON_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tipc_nl_node_get_monitor,
|
.doit = tipc_nl_node_get_monitor,
|
||||||
.dumpit = tipc_nl_node_dump_monitor,
|
.dumpit = tipc_nl_node_dump_monitor,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_MON_PEER_GET,
|
.cmd = TIPC_NL_MON_PEER_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.dumpit = tipc_nl_node_dump_monitor_peer,
|
.dumpit = tipc_nl_node_dump_monitor_peer,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_PEER_REMOVE,
|
.cmd = TIPC_NL_PEER_REMOVE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tipc_nl_peer_rm,
|
.doit = tipc_nl_peer_rm,
|
||||||
},
|
},
|
||||||
#ifdef CONFIG_TIPC_MEDIA_UDP
|
#ifdef CONFIG_TIPC_MEDIA_UDP
|
||||||
{
|
{
|
||||||
.cmd = TIPC_NL_UDP_GET_REMOTEIP,
|
.cmd = TIPC_NL_UDP_GET_REMOTEIP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.dumpit = tipc_udp_nl_dump_remoteip,
|
.dumpit = tipc_udp_nl_dump_remoteip,
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1305,6 +1305,7 @@ static int tipc_nl_compat_recv(struct sk_buff *skb, struct genl_info *info)
|
|||||||
static const struct genl_ops tipc_genl_compat_ops[] = {
|
static const struct genl_ops tipc_genl_compat_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = TIPC_GENL_CMD,
|
.cmd = TIPC_GENL_CMD,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = tipc_nl_compat_recv,
|
.doit = tipc_nl_compat_recv,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -419,21 +419,25 @@ static const struct nla_policy wimax_gnl_policy[WIMAX_GNL_ATTR_MAX + 1] = {
|
|||||||
static const struct genl_ops wimax_gnl_ops[] = {
|
static const struct genl_ops wimax_gnl_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = WIMAX_GNL_OP_MSG_FROM_USER,
|
.cmd = WIMAX_GNL_OP_MSG_FROM_USER,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = wimax_gnl_doit_msg_from_user,
|
.doit = wimax_gnl_doit_msg_from_user,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = WIMAX_GNL_OP_RESET,
|
.cmd = WIMAX_GNL_OP_RESET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = wimax_gnl_doit_reset,
|
.doit = wimax_gnl_doit_reset,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = WIMAX_GNL_OP_RFKILL,
|
.cmd = WIMAX_GNL_OP_RFKILL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = wimax_gnl_doit_rfkill,
|
.doit = wimax_gnl_doit_rfkill,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = WIMAX_GNL_OP_STATE_GET,
|
.cmd = WIMAX_GNL_OP_STATE_GET,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.doit = wimax_gnl_doit_state_get,
|
.doit = wimax_gnl_doit_state_get,
|
||||||
},
|
},
|
||||||
|
@ -13591,6 +13591,7 @@ static void nl80211_post_doit(const struct genl_ops *ops, struct sk_buff *skb,
|
|||||||
static const struct genl_ops nl80211_ops[] = {
|
static const struct genl_ops nl80211_ops[] = {
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_GET_WIPHY,
|
.cmd = NL80211_CMD_GET_WIPHY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_get_wiphy,
|
.doit = nl80211_get_wiphy,
|
||||||
.dumpit = nl80211_dump_wiphy,
|
.dumpit = nl80211_dump_wiphy,
|
||||||
.done = nl80211_dump_wiphy_done,
|
.done = nl80211_dump_wiphy_done,
|
||||||
@ -13600,12 +13601,14 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_WIPHY,
|
.cmd = NL80211_CMD_SET_WIPHY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_wiphy,
|
.doit = nl80211_set_wiphy,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_RTNL,
|
.internal_flags = NL80211_FLAG_NEED_RTNL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_GET_INTERFACE,
|
.cmd = NL80211_CMD_GET_INTERFACE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_get_interface,
|
.doit = nl80211_get_interface,
|
||||||
.dumpit = nl80211_dump_interface,
|
.dumpit = nl80211_dump_interface,
|
||||||
/* can be retrieved by unprivileged users */
|
/* can be retrieved by unprivileged users */
|
||||||
@ -13614,6 +13617,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_INTERFACE,
|
.cmd = NL80211_CMD_SET_INTERFACE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_interface,
|
.doit = nl80211_set_interface,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||||
@ -13621,6 +13625,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_NEW_INTERFACE,
|
.cmd = NL80211_CMD_NEW_INTERFACE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_new_interface,
|
.doit = nl80211_new_interface,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
||||||
@ -13628,6 +13633,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_DEL_INTERFACE,
|
.cmd = NL80211_CMD_DEL_INTERFACE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_del_interface,
|
.doit = nl80211_del_interface,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV |
|
.internal_flags = NL80211_FLAG_NEED_WDEV |
|
||||||
@ -13635,6 +13641,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_GET_KEY,
|
.cmd = NL80211_CMD_GET_KEY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_get_key,
|
.doit = nl80211_get_key,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13642,6 +13649,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_KEY,
|
.cmd = NL80211_CMD_SET_KEY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_key,
|
.doit = nl80211_set_key,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13650,6 +13658,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_NEW_KEY,
|
.cmd = NL80211_CMD_NEW_KEY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_new_key,
|
.doit = nl80211_new_key,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13658,6 +13667,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_DEL_KEY,
|
.cmd = NL80211_CMD_DEL_KEY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_del_key,
|
.doit = nl80211_del_key,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13665,6 +13675,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_BEACON,
|
.cmd = NL80211_CMD_SET_BEACON,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.doit = nl80211_set_beacon,
|
.doit = nl80211_set_beacon,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13672,6 +13683,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_START_AP,
|
.cmd = NL80211_CMD_START_AP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.doit = nl80211_start_ap,
|
.doit = nl80211_start_ap,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13679,6 +13691,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_STOP_AP,
|
.cmd = NL80211_CMD_STOP_AP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.doit = nl80211_stop_ap,
|
.doit = nl80211_stop_ap,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13686,6 +13699,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_GET_STATION,
|
.cmd = NL80211_CMD_GET_STATION,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_get_station,
|
.doit = nl80211_get_station,
|
||||||
.dumpit = nl80211_dump_station,
|
.dumpit = nl80211_dump_station,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||||
@ -13693,6 +13707,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_STATION,
|
.cmd = NL80211_CMD_SET_STATION,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_station,
|
.doit = nl80211_set_station,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13700,6 +13715,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_NEW_STATION,
|
.cmd = NL80211_CMD_NEW_STATION,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_new_station,
|
.doit = nl80211_new_station,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13707,6 +13723,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_DEL_STATION,
|
.cmd = NL80211_CMD_DEL_STATION,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_del_station,
|
.doit = nl80211_del_station,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13714,6 +13731,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_GET_MPATH,
|
.cmd = NL80211_CMD_GET_MPATH,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_get_mpath,
|
.doit = nl80211_get_mpath,
|
||||||
.dumpit = nl80211_dump_mpath,
|
.dumpit = nl80211_dump_mpath,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
@ -13722,6 +13740,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_GET_MPP,
|
.cmd = NL80211_CMD_GET_MPP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_get_mpp,
|
.doit = nl80211_get_mpp,
|
||||||
.dumpit = nl80211_dump_mpp,
|
.dumpit = nl80211_dump_mpp,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
@ -13730,6 +13749,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_MPATH,
|
.cmd = NL80211_CMD_SET_MPATH,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_mpath,
|
.doit = nl80211_set_mpath,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13737,6 +13757,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_NEW_MPATH,
|
.cmd = NL80211_CMD_NEW_MPATH,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_new_mpath,
|
.doit = nl80211_new_mpath,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13744,6 +13765,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_DEL_MPATH,
|
.cmd = NL80211_CMD_DEL_MPATH,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_del_mpath,
|
.doit = nl80211_del_mpath,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13751,6 +13773,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_BSS,
|
.cmd = NL80211_CMD_SET_BSS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_bss,
|
.doit = nl80211_set_bss,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13758,6 +13781,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_GET_REG,
|
.cmd = NL80211_CMD_GET_REG,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_get_reg_do,
|
.doit = nl80211_get_reg_do,
|
||||||
.dumpit = nl80211_get_reg_dump,
|
.dumpit = nl80211_get_reg_dump,
|
||||||
.internal_flags = NL80211_FLAG_NEED_RTNL,
|
.internal_flags = NL80211_FLAG_NEED_RTNL,
|
||||||
@ -13766,6 +13790,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
#ifdef CONFIG_CFG80211_CRDA_SUPPORT
|
#ifdef CONFIG_CFG80211_CRDA_SUPPORT
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_REG,
|
.cmd = NL80211_CMD_SET_REG,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_reg,
|
.doit = nl80211_set_reg,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_RTNL,
|
.internal_flags = NL80211_FLAG_NEED_RTNL,
|
||||||
@ -13773,16 +13798,19 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_REQ_SET_REG,
|
.cmd = NL80211_CMD_REQ_SET_REG,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_req_set_reg,
|
.doit = nl80211_req_set_reg,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_RELOAD_REGDB,
|
.cmd = NL80211_CMD_RELOAD_REGDB,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_reload_regdb,
|
.doit = nl80211_reload_regdb,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_GET_MESH_CONFIG,
|
.cmd = NL80211_CMD_GET_MESH_CONFIG,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_get_mesh_config,
|
.doit = nl80211_get_mesh_config,
|
||||||
/* can be retrieved by unprivileged users */
|
/* can be retrieved by unprivileged users */
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13790,6 +13818,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_MESH_CONFIG,
|
.cmd = NL80211_CMD_SET_MESH_CONFIG,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_update_mesh_config,
|
.doit = nl80211_update_mesh_config,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13797,6 +13826,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_TRIGGER_SCAN,
|
.cmd = NL80211_CMD_TRIGGER_SCAN,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_trigger_scan,
|
.doit = nl80211_trigger_scan,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
||||||
@ -13804,6 +13834,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_ABORT_SCAN,
|
.cmd = NL80211_CMD_ABORT_SCAN,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_abort_scan,
|
.doit = nl80211_abort_scan,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
||||||
@ -13811,10 +13842,12 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_GET_SCAN,
|
.cmd = NL80211_CMD_GET_SCAN,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.dumpit = nl80211_dump_scan,
|
.dumpit = nl80211_dump_scan,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_START_SCHED_SCAN,
|
.cmd = NL80211_CMD_START_SCHED_SCAN,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_start_sched_scan,
|
.doit = nl80211_start_sched_scan,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13822,6 +13855,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_STOP_SCHED_SCAN,
|
.cmd = NL80211_CMD_STOP_SCHED_SCAN,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_stop_sched_scan,
|
.doit = nl80211_stop_sched_scan,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13829,6 +13863,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_AUTHENTICATE,
|
.cmd = NL80211_CMD_AUTHENTICATE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_authenticate,
|
.doit = nl80211_authenticate,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13837,6 +13872,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_ASSOCIATE,
|
.cmd = NL80211_CMD_ASSOCIATE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_associate,
|
.doit = nl80211_associate,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13845,6 +13881,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_DEAUTHENTICATE,
|
.cmd = NL80211_CMD_DEAUTHENTICATE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_deauthenticate,
|
.doit = nl80211_deauthenticate,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13852,6 +13889,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_DISASSOCIATE,
|
.cmd = NL80211_CMD_DISASSOCIATE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_disassociate,
|
.doit = nl80211_disassociate,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13859,6 +13897,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_JOIN_IBSS,
|
.cmd = NL80211_CMD_JOIN_IBSS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_join_ibss,
|
.doit = nl80211_join_ibss,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13866,6 +13905,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_LEAVE_IBSS,
|
.cmd = NL80211_CMD_LEAVE_IBSS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_leave_ibss,
|
.doit = nl80211_leave_ibss,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13874,6 +13914,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
#ifdef CONFIG_NL80211_TESTMODE
|
#ifdef CONFIG_NL80211_TESTMODE
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_TESTMODE,
|
.cmd = NL80211_CMD_TESTMODE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_testmode_do,
|
.doit = nl80211_testmode_do,
|
||||||
.dumpit = nl80211_testmode_dump,
|
.dumpit = nl80211_testmode_dump,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
@ -13883,6 +13924,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_CONNECT,
|
.cmd = NL80211_CMD_CONNECT,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_connect,
|
.doit = nl80211_connect,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13891,6 +13933,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_UPDATE_CONNECT_PARAMS,
|
.cmd = NL80211_CMD_UPDATE_CONNECT_PARAMS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_update_connect_params,
|
.doit = nl80211_update_connect_params,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13899,6 +13942,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_DISCONNECT,
|
.cmd = NL80211_CMD_DISCONNECT,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_disconnect,
|
.doit = nl80211_disconnect,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13906,6 +13950,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_WIPHY_NETNS,
|
.cmd = NL80211_CMD_SET_WIPHY_NETNS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_wiphy_netns,
|
.doit = nl80211_wiphy_netns,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
||||||
@ -13913,10 +13958,12 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_GET_SURVEY,
|
.cmd = NL80211_CMD_GET_SURVEY,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.dumpit = nl80211_dump_survey,
|
.dumpit = nl80211_dump_survey,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_PMKSA,
|
.cmd = NL80211_CMD_SET_PMKSA,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_setdel_pmksa,
|
.doit = nl80211_setdel_pmksa,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13925,6 +13972,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_DEL_PMKSA,
|
.cmd = NL80211_CMD_DEL_PMKSA,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_setdel_pmksa,
|
.doit = nl80211_setdel_pmksa,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13932,6 +13980,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_FLUSH_PMKSA,
|
.cmd = NL80211_CMD_FLUSH_PMKSA,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_flush_pmksa,
|
.doit = nl80211_flush_pmksa,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -13939,6 +13988,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_REMAIN_ON_CHANNEL,
|
.cmd = NL80211_CMD_REMAIN_ON_CHANNEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_remain_on_channel,
|
.doit = nl80211_remain_on_channel,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
||||||
@ -13946,6 +13996,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL,
|
.cmd = NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_cancel_remain_on_channel,
|
.doit = nl80211_cancel_remain_on_channel,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
||||||
@ -13953,6 +14004,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_TX_BITRATE_MASK,
|
.cmd = NL80211_CMD_SET_TX_BITRATE_MASK,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_tx_bitrate_mask,
|
.doit = nl80211_set_tx_bitrate_mask,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||||
@ -13960,6 +14012,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_REGISTER_FRAME,
|
.cmd = NL80211_CMD_REGISTER_FRAME,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_register_mgmt,
|
.doit = nl80211_register_mgmt,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV |
|
.internal_flags = NL80211_FLAG_NEED_WDEV |
|
||||||
@ -13967,6 +14020,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_FRAME,
|
.cmd = NL80211_CMD_FRAME,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_tx_mgmt,
|
.doit = nl80211_tx_mgmt,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
||||||
@ -13974,6 +14028,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_FRAME_WAIT_CANCEL,
|
.cmd = NL80211_CMD_FRAME_WAIT_CANCEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_tx_mgmt_cancel_wait,
|
.doit = nl80211_tx_mgmt_cancel_wait,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
||||||
@ -13981,6 +14036,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_POWER_SAVE,
|
.cmd = NL80211_CMD_SET_POWER_SAVE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_power_save,
|
.doit = nl80211_set_power_save,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||||
@ -13988,6 +14044,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_GET_POWER_SAVE,
|
.cmd = NL80211_CMD_GET_POWER_SAVE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_get_power_save,
|
.doit = nl80211_get_power_save,
|
||||||
/* can be retrieved by unprivileged users */
|
/* can be retrieved by unprivileged users */
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||||
@ -13995,6 +14052,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_CQM,
|
.cmd = NL80211_CMD_SET_CQM,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_cqm,
|
.doit = nl80211_set_cqm,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||||
@ -14002,6 +14060,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_CHANNEL,
|
.cmd = NL80211_CMD_SET_CHANNEL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_channel,
|
.doit = nl80211_set_channel,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||||
@ -14009,6 +14068,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_WDS_PEER,
|
.cmd = NL80211_CMD_SET_WDS_PEER,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_wds_peer,
|
.doit = nl80211_set_wds_peer,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||||
@ -14016,6 +14076,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_JOIN_MESH,
|
.cmd = NL80211_CMD_JOIN_MESH,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_join_mesh,
|
.doit = nl80211_join_mesh,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14023,6 +14084,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_LEAVE_MESH,
|
.cmd = NL80211_CMD_LEAVE_MESH,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_leave_mesh,
|
.doit = nl80211_leave_mesh,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14030,6 +14092,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_JOIN_OCB,
|
.cmd = NL80211_CMD_JOIN_OCB,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_join_ocb,
|
.doit = nl80211_join_ocb,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14037,6 +14100,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_LEAVE_OCB,
|
.cmd = NL80211_CMD_LEAVE_OCB,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_leave_ocb,
|
.doit = nl80211_leave_ocb,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14045,6 +14109,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_GET_WOWLAN,
|
.cmd = NL80211_CMD_GET_WOWLAN,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_get_wowlan,
|
.doit = nl80211_get_wowlan,
|
||||||
/* can be retrieved by unprivileged users */
|
/* can be retrieved by unprivileged users */
|
||||||
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
||||||
@ -14052,6 +14117,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_WOWLAN,
|
.cmd = NL80211_CMD_SET_WOWLAN,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_wowlan,
|
.doit = nl80211_set_wowlan,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
||||||
@ -14060,6 +14126,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_REKEY_OFFLOAD,
|
.cmd = NL80211_CMD_SET_REKEY_OFFLOAD,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_rekey_data,
|
.doit = nl80211_set_rekey_data,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14068,6 +14135,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_TDLS_MGMT,
|
.cmd = NL80211_CMD_TDLS_MGMT,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_tdls_mgmt,
|
.doit = nl80211_tdls_mgmt,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14075,6 +14143,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_TDLS_OPER,
|
.cmd = NL80211_CMD_TDLS_OPER,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_tdls_oper,
|
.doit = nl80211_tdls_oper,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14082,6 +14151,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_UNEXPECTED_FRAME,
|
.cmd = NL80211_CMD_UNEXPECTED_FRAME,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_register_unexpected_frame,
|
.doit = nl80211_register_unexpected_frame,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||||
@ -14089,6 +14159,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_PROBE_CLIENT,
|
.cmd = NL80211_CMD_PROBE_CLIENT,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_probe_client,
|
.doit = nl80211_probe_client,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14096,6 +14167,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_REGISTER_BEACONS,
|
.cmd = NL80211_CMD_REGISTER_BEACONS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_register_beacons,
|
.doit = nl80211_register_beacons,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
||||||
@ -14103,6 +14175,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_NOACK_MAP,
|
.cmd = NL80211_CMD_SET_NOACK_MAP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_noack_map,
|
.doit = nl80211_set_noack_map,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||||
@ -14110,6 +14183,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_START_P2P_DEVICE,
|
.cmd = NL80211_CMD_START_P2P_DEVICE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_start_p2p_device,
|
.doit = nl80211_start_p2p_device,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV |
|
.internal_flags = NL80211_FLAG_NEED_WDEV |
|
||||||
@ -14117,6 +14191,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_STOP_P2P_DEVICE,
|
.cmd = NL80211_CMD_STOP_P2P_DEVICE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_stop_p2p_device,
|
.doit = nl80211_stop_p2p_device,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
||||||
@ -14124,6 +14199,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_START_NAN,
|
.cmd = NL80211_CMD_START_NAN,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_start_nan,
|
.doit = nl80211_start_nan,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV |
|
.internal_flags = NL80211_FLAG_NEED_WDEV |
|
||||||
@ -14131,6 +14207,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_STOP_NAN,
|
.cmd = NL80211_CMD_STOP_NAN,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_stop_nan,
|
.doit = nl80211_stop_nan,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
||||||
@ -14138,6 +14215,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_ADD_NAN_FUNCTION,
|
.cmd = NL80211_CMD_ADD_NAN_FUNCTION,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_nan_add_func,
|
.doit = nl80211_nan_add_func,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
||||||
@ -14145,6 +14223,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_DEL_NAN_FUNCTION,
|
.cmd = NL80211_CMD_DEL_NAN_FUNCTION,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_nan_del_func,
|
.doit = nl80211_nan_del_func,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
||||||
@ -14152,6 +14231,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_CHANGE_NAN_CONFIG,
|
.cmd = NL80211_CMD_CHANGE_NAN_CONFIG,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_nan_change_config,
|
.doit = nl80211_nan_change_config,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
||||||
@ -14159,6 +14239,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_MCAST_RATE,
|
.cmd = NL80211_CMD_SET_MCAST_RATE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_mcast_rate,
|
.doit = nl80211_set_mcast_rate,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||||
@ -14166,6 +14247,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_MAC_ACL,
|
.cmd = NL80211_CMD_SET_MAC_ACL,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_mac_acl,
|
.doit = nl80211_set_mac_acl,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||||
@ -14173,6 +14255,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_RADAR_DETECT,
|
.cmd = NL80211_CMD_RADAR_DETECT,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_start_radar_detection,
|
.doit = nl80211_start_radar_detection,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14180,10 +14263,12 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_GET_PROTOCOL_FEATURES,
|
.cmd = NL80211_CMD_GET_PROTOCOL_FEATURES,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_get_protocol_features,
|
.doit = nl80211_get_protocol_features,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_UPDATE_FT_IES,
|
.cmd = NL80211_CMD_UPDATE_FT_IES,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_update_ft_ies,
|
.doit = nl80211_update_ft_ies,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14191,6 +14276,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_CRIT_PROTOCOL_START,
|
.cmd = NL80211_CMD_CRIT_PROTOCOL_START,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_crit_protocol_start,
|
.doit = nl80211_crit_protocol_start,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
||||||
@ -14198,6 +14284,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_CRIT_PROTOCOL_STOP,
|
.cmd = NL80211_CMD_CRIT_PROTOCOL_STOP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_crit_protocol_stop,
|
.doit = nl80211_crit_protocol_stop,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
||||||
@ -14205,12 +14292,14 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_GET_COALESCE,
|
.cmd = NL80211_CMD_GET_COALESCE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_get_coalesce,
|
.doit = nl80211_get_coalesce,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
||||||
NL80211_FLAG_NEED_RTNL,
|
NL80211_FLAG_NEED_RTNL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_COALESCE,
|
.cmd = NL80211_CMD_SET_COALESCE,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_coalesce,
|
.doit = nl80211_set_coalesce,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
.internal_flags = NL80211_FLAG_NEED_WIPHY |
|
||||||
@ -14218,6 +14307,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_CHANNEL_SWITCH,
|
.cmd = NL80211_CMD_CHANNEL_SWITCH,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_channel_switch,
|
.doit = nl80211_channel_switch,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14225,6 +14315,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_VENDOR,
|
.cmd = NL80211_CMD_VENDOR,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_vendor_cmd,
|
.doit = nl80211_vendor_cmd,
|
||||||
.dumpit = nl80211_vendor_cmd_dump,
|
.dumpit = nl80211_vendor_cmd_dump,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
@ -14234,6 +14325,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_QOS_MAP,
|
.cmd = NL80211_CMD_SET_QOS_MAP,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_qos_map,
|
.doit = nl80211_set_qos_map,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14241,6 +14333,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_ADD_TX_TS,
|
.cmd = NL80211_CMD_ADD_TX_TS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_add_tx_ts,
|
.doit = nl80211_add_tx_ts,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14248,6 +14341,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_DEL_TX_TS,
|
.cmd = NL80211_CMD_DEL_TX_TS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_del_tx_ts,
|
.doit = nl80211_del_tx_ts,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14255,6 +14349,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_TDLS_CHANNEL_SWITCH,
|
.cmd = NL80211_CMD_TDLS_CHANNEL_SWITCH,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_tdls_channel_switch,
|
.doit = nl80211_tdls_channel_switch,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14262,6 +14357,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_TDLS_CANCEL_CHANNEL_SWITCH,
|
.cmd = NL80211_CMD_TDLS_CANCEL_CHANNEL_SWITCH,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_tdls_cancel_channel_switch,
|
.doit = nl80211_tdls_cancel_channel_switch,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14269,6 +14365,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_MULTICAST_TO_UNICAST,
|
.cmd = NL80211_CMD_SET_MULTICAST_TO_UNICAST,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_multicast_to_unicast,
|
.doit = nl80211_set_multicast_to_unicast,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||||
@ -14276,6 +14373,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_SET_PMK,
|
.cmd = NL80211_CMD_SET_PMK,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_set_pmk,
|
.doit = nl80211_set_pmk,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
NL80211_FLAG_NEED_RTNL |
|
NL80211_FLAG_NEED_RTNL |
|
||||||
@ -14283,12 +14381,14 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_DEL_PMK,
|
.cmd = NL80211_CMD_DEL_PMK,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_del_pmk,
|
.doit = nl80211_del_pmk,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
NL80211_FLAG_NEED_RTNL,
|
NL80211_FLAG_NEED_RTNL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_EXTERNAL_AUTH,
|
.cmd = NL80211_CMD_EXTERNAL_AUTH,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_external_auth,
|
.doit = nl80211_external_auth,
|
||||||
.flags = GENL_ADMIN_PERM,
|
.flags = GENL_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14296,6 +14396,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_CONTROL_PORT_FRAME,
|
.cmd = NL80211_CMD_CONTROL_PORT_FRAME,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_tx_control_port,
|
.doit = nl80211_tx_control_port,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
@ -14303,12 +14404,14 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_GET_FTM_RESPONDER_STATS,
|
.cmd = NL80211_CMD_GET_FTM_RESPONDER_STATS,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_get_ftm_responder_stats,
|
.doit = nl80211_get_ftm_responder_stats,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV |
|
||||||
NL80211_FLAG_NEED_RTNL,
|
NL80211_FLAG_NEED_RTNL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_PEER_MEASUREMENT_START,
|
.cmd = NL80211_CMD_PEER_MEASUREMENT_START,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_pmsr_start,
|
.doit = nl80211_pmsr_start,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
|
||||||
@ -14316,6 +14419,7 @@ static const struct genl_ops nl80211_ops[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.cmd = NL80211_CMD_NOTIFY_RADAR,
|
.cmd = NL80211_CMD_NOTIFY_RADAR,
|
||||||
|
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||||
.doit = nl80211_notify_radar_detection,
|
.doit = nl80211_notify_radar_detection,
|
||||||
.flags = GENL_UNS_ADMIN_PERM,
|
.flags = GENL_UNS_ADMIN_PERM,
|
||||||
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
|
||||||
|
Loading…
Reference in New Issue
Block a user