mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
netlink: pass extended ACK struct to parsing functions
Pass the new extended ACK reporting struct to all of the generic netlink parsing functions. For now, pass NULL in almost all callers (except for some in the core.) Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
ba0dc5f6e0
commit
fceb6435e8
129 changed files with 477 additions and 391 deletions
|
|
@ -557,7 +557,7 @@ struct tc_action *tcf_action_init_1(struct net *net, struct nlattr *nla,
|
|||
int err;
|
||||
|
||||
if (name == NULL) {
|
||||
err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL);
|
||||
err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL, NULL);
|
||||
if (err < 0)
|
||||
goto err_out;
|
||||
err = -EINVAL;
|
||||
|
|
@ -654,7 +654,7 @@ int tcf_action_init(struct net *net, struct nlattr *nla, struct nlattr *est,
|
|||
int err;
|
||||
int i;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_ACT_MAX_PRIO, nla, NULL);
|
||||
err = nla_parse_nested(tb, TCA_ACT_MAX_PRIO, nla, NULL, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
@ -786,7 +786,7 @@ static struct tc_action *tcf_action_get_1(struct net *net, struct nlattr *nla,
|
|||
int index;
|
||||
int err;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL);
|
||||
err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL, NULL);
|
||||
if (err < 0)
|
||||
goto err_out;
|
||||
|
||||
|
|
@ -835,7 +835,7 @@ static int tca_action_flush(struct net *net, struct nlattr *nla,
|
|||
|
||||
b = skb_tail_pointer(skb);
|
||||
|
||||
err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL);
|
||||
err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL, NULL);
|
||||
if (err < 0)
|
||||
goto err_out;
|
||||
|
||||
|
|
@ -921,7 +921,7 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
|
|||
struct tc_action *act;
|
||||
LIST_HEAD(actions);
|
||||
|
||||
ret = nla_parse_nested(tb, TCA_ACT_MAX_PRIO, nla, NULL);
|
||||
ret = nla_parse_nested(tb, TCA_ACT_MAX_PRIO, nla, NULL, NULL);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
@ -1004,7 +1004,8 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n)
|
|||
!netlink_capable(skb, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCA_ACT_MAX, NULL);
|
||||
ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCA_ACT_MAX, NULL,
|
||||
NULL);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
@ -1051,19 +1052,20 @@ static struct nlattr *find_dump_kind(const struct nlmsghdr *n)
|
|||
struct nlattr *nla[TCAA_MAX + 1];
|
||||
struct nlattr *kind;
|
||||
|
||||
if (nlmsg_parse(n, sizeof(struct tcamsg), nla, TCAA_MAX, NULL) < 0)
|
||||
if (nlmsg_parse(n, sizeof(struct tcamsg), nla, TCAA_MAX,
|
||||
NULL, NULL) < 0)
|
||||
return NULL;
|
||||
tb1 = nla[TCA_ACT_TAB];
|
||||
if (tb1 == NULL)
|
||||
return NULL;
|
||||
|
||||
if (nla_parse(tb, TCA_ACT_MAX_PRIO, nla_data(tb1),
|
||||
NLMSG_ALIGN(nla_len(tb1)), NULL) < 0)
|
||||
NLMSG_ALIGN(nla_len(tb1)), NULL, NULL) < 0)
|
||||
return NULL;
|
||||
|
||||
if (tb[1] == NULL)
|
||||
return NULL;
|
||||
if (nla_parse_nested(tb2, TCA_ACT_MAX, tb[1], NULL) < 0)
|
||||
if (nla_parse_nested(tb2, TCA_ACT_MAX, tb[1], NULL, NULL) < 0)
|
||||
return NULL;
|
||||
kind = tb2[TCA_ACT_KIND];
|
||||
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ static int tcf_bpf_init(struct net *net, struct nlattr *nla,
|
|||
if (!nla)
|
||||
return -EINVAL;
|
||||
|
||||
ret = nla_parse_nested(tb, TCA_ACT_BPF_MAX, nla, act_bpf_policy);
|
||||
ret = nla_parse_nested(tb, TCA_ACT_BPF_MAX, nla, act_bpf_policy, NULL);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,8 @@ static int tcf_connmark_init(struct net *net, struct nlattr *nla,
|
|||
if (!nla)
|
||||
return -EINVAL;
|
||||
|
||||
ret = nla_parse_nested(tb, TCA_CONNMARK_MAX, nla, connmark_policy);
|
||||
ret = nla_parse_nested(tb, TCA_CONNMARK_MAX, nla, connmark_policy,
|
||||
NULL);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ static int tcf_csum_init(struct net *net, struct nlattr *nla,
|
|||
if (nla == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_CSUM_MAX, nla, csum_policy);
|
||||
err = nla_parse_nested(tb, TCA_CSUM_MAX, nla, csum_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ static int tcf_gact_init(struct net *net, struct nlattr *nla,
|
|||
if (nla == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_GACT_MAX, nla, gact_policy);
|
||||
err = nla_parse_nested(tb, TCA_GACT_MAX, nla, gact_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -443,7 +443,7 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla,
|
|||
int ret = 0;
|
||||
int err;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_IFE_MAX, nla, ife_policy);
|
||||
err = nla_parse_nested(tb, TCA_IFE_MAX, nla, ife_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
@ -514,7 +514,7 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla,
|
|||
|
||||
if (tb[TCA_IFE_METALST]) {
|
||||
err = nla_parse_nested(tb2, IFE_META_MAX, tb[TCA_IFE_METALST],
|
||||
NULL);
|
||||
NULL, NULL);
|
||||
if (err) {
|
||||
metadata_parse_err:
|
||||
if (exists)
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ static int __tcf_ipt_init(struct tc_action_net *tn, struct nlattr *nla,
|
|||
if (nla == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_IPT_MAX, nla, ipt_policy);
|
||||
err = nla_parse_nested(tb, TCA_IPT_MAX, nla, ipt_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ static int tcf_mirred_init(struct net *net, struct nlattr *nla,
|
|||
|
||||
if (nla == NULL)
|
||||
return -EINVAL;
|
||||
ret = nla_parse_nested(tb, TCA_MIRRED_MAX, nla, mirred_policy);
|
||||
ret = nla_parse_nested(tb, TCA_MIRRED_MAX, nla, mirred_policy, NULL);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
if (tb[TCA_MIRRED_PARMS] == NULL)
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ static int tcf_nat_init(struct net *net, struct nlattr *nla, struct nlattr *est,
|
|||
if (nla == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_NAT_MAX, nla, nat_policy);
|
||||
err = nla_parse_nested(tb, TCA_NAT_MAX, nla, nat_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ static struct tcf_pedit_key_ex *tcf_pedit_keys_ex_parse(struct nlattr *nla,
|
|||
}
|
||||
|
||||
err = nla_parse_nested(tb, TCA_PEDIT_KEY_EX_MAX, ka,
|
||||
pedit_key_ex_policy);
|
||||
pedit_key_ex_policy, NULL);
|
||||
if (err)
|
||||
goto err_out;
|
||||
|
||||
|
|
@ -147,7 +147,7 @@ static int tcf_pedit_init(struct net *net, struct nlattr *nla,
|
|||
if (nla == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_PEDIT_MAX, nla, pedit_policy);
|
||||
err = nla_parse_nested(tb, TCA_PEDIT_MAX, nla, pedit_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ static int tcf_act_police_init(struct net *net, struct nlattr *nla,
|
|||
if (nla == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_POLICE_MAX, nla, police_policy);
|
||||
err = nla_parse_nested(tb, TCA_POLICE_MAX, nla, police_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ static int tcf_sample_init(struct net *net, struct nlattr *nla,
|
|||
|
||||
if (!nla)
|
||||
return -EINVAL;
|
||||
ret = nla_parse_nested(tb, TCA_SAMPLE_MAX, nla, sample_policy);
|
||||
ret = nla_parse_nested(tb, TCA_SAMPLE_MAX, nla, sample_policy, NULL);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
if (!tb[TCA_SAMPLE_PARMS] || !tb[TCA_SAMPLE_RATE] ||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static int tcf_simp_init(struct net *net, struct nlattr *nla,
|
|||
if (nla == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_DEF_MAX, nla, simple_policy);
|
||||
err = nla_parse_nested(tb, TCA_DEF_MAX, nla, simple_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ static int tcf_skbedit_init(struct net *net, struct nlattr *nla,
|
|||
if (nla == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_SKBEDIT_MAX, nla, skbedit_policy);
|
||||
err = nla_parse_nested(tb, TCA_SKBEDIT_MAX, nla, skbedit_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ static int tcf_skbmod_init(struct net *net, struct nlattr *nla,
|
|||
if (!nla)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_SKBMOD_MAX, nla, skbmod_policy);
|
||||
err = nla_parse_nested(tb, TCA_SKBMOD_MAX, nla, skbmod_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,8 @@ static int tunnel_key_init(struct net *net, struct nlattr *nla,
|
|||
if (!nla)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_TUNNEL_KEY_MAX, nla, tunnel_key_policy);
|
||||
err = nla_parse_nested(tb, TCA_TUNNEL_KEY_MAX, nla, tunnel_key_policy,
|
||||
NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ static int tcf_vlan_init(struct net *net, struct nlattr *nla,
|
|||
if (!nla)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_VLAN_MAX, nla, vlan_policy);
|
||||
err = nla_parse_nested(tb, TCA_VLAN_MAX, nla, vlan_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n)
|
|||
replay:
|
||||
tp_created = 0;
|
||||
|
||||
err = nlmsg_parse(n, sizeof(*t), tca, TCA_MAX, NULL);
|
||||
err = nlmsg_parse(n, sizeof(*t), tca, TCA_MAX, NULL, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ static int basic_change(struct net *net, struct sk_buff *in_skb,
|
|||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_BASIC_MAX, tca[TCA_OPTIONS],
|
||||
basic_policy);
|
||||
basic_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -478,7 +478,8 @@ static int cls_bpf_change(struct net *net, struct sk_buff *in_skb,
|
|||
if (tca[TCA_OPTIONS] == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
ret = nla_parse_nested(tb, TCA_BPF_MAX, tca[TCA_OPTIONS], bpf_policy);
|
||||
ret = nla_parse_nested(tb, TCA_BPF_MAX, tca[TCA_OPTIONS], bpf_policy,
|
||||
NULL);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ static int cls_cgroup_change(struct net *net, struct sk_buff *in_skb,
|
|||
new->handle = handle;
|
||||
new->tp = tp;
|
||||
err = nla_parse_nested(tb, TCA_CGROUP_MAX, tca[TCA_OPTIONS],
|
||||
cgroup_policy);
|
||||
cgroup_policy, NULL);
|
||||
if (err < 0)
|
||||
goto errout;
|
||||
|
||||
|
|
|
|||
|
|
@ -400,7 +400,7 @@ static int flow_change(struct net *net, struct sk_buff *in_skb,
|
|||
if (opt == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_FLOW_MAX, opt, flow_policy);
|
||||
err = nla_parse_nested(tb, TCA_FLOW_MAX, opt, flow_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -848,7 +848,8 @@ static int fl_change(struct net *net, struct sk_buff *in_skb,
|
|||
if (!tb)
|
||||
return -ENOBUFS;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_FLOWER_MAX, tca[TCA_OPTIONS], fl_policy);
|
||||
err = nla_parse_nested(tb, TCA_FLOWER_MAX, tca[TCA_OPTIONS],
|
||||
fl_policy, NULL);
|
||||
if (err < 0)
|
||||
goto errout_tb;
|
||||
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ static int fw_change(struct net *net, struct sk_buff *in_skb,
|
|||
if (!opt)
|
||||
return handle ? -EINVAL : 0; /* Succeed if it is old method. */
|
||||
|
||||
err = nla_parse_nested(tb, TCA_FW_MAX, opt, fw_policy);
|
||||
err = nla_parse_nested(tb, TCA_FW_MAX, opt, fw_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -161,8 +161,8 @@ static int mall_change(struct net *net, struct sk_buff *in_skb,
|
|||
if (head)
|
||||
return -EEXIST;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_MATCHALL_MAX,
|
||||
tca[TCA_OPTIONS], mall_policy);
|
||||
err = nla_parse_nested(tb, TCA_MATCHALL_MAX, tca[TCA_OPTIONS],
|
||||
mall_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ static int route4_change(struct net *net, struct sk_buff *in_skb,
|
|||
if (opt == NULL)
|
||||
return handle ? -EINVAL : 0;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_ROUTE4_MAX, opt, route4_policy);
|
||||
err = nla_parse_nested(tb, TCA_ROUTE4_MAX, opt, route4_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ static int rsvp_change(struct net *net, struct sk_buff *in_skb,
|
|||
if (opt == NULL)
|
||||
return handle ? -EINVAL : 0;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_RSVP_MAX, opt, rsvp_policy);
|
||||
err = nla_parse_nested(tb, TCA_RSVP_MAX, opt, rsvp_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -482,7 +482,7 @@ tcindex_change(struct net *net, struct sk_buff *in_skb,
|
|||
if (!opt)
|
||||
return 0;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_TCINDEX_MAX, opt, tcindex_policy);
|
||||
err = nla_parse_nested(tb, TCA_TCINDEX_MAX, opt, tcindex_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -860,7 +860,7 @@ static int u32_change(struct net *net, struct sk_buff *in_skb,
|
|||
if (opt == NULL)
|
||||
return handle ? -EINVAL : 0;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_U32_MAX, opt, u32_policy);
|
||||
err = nla_parse_nested(tb, TCA_U32_MAX, opt, u32_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -912,7 +912,7 @@ static int em_meta_change(struct net *net, void *data, int len,
|
|||
struct tcf_meta_hdr *hdr;
|
||||
struct meta_match *meta = NULL;
|
||||
|
||||
err = nla_parse(tb, TCA_EM_META_MAX, data, len, meta_policy);
|
||||
err = nla_parse(tb, TCA_EM_META_MAX, data, len, meta_policy, NULL);
|
||||
if (err < 0)
|
||||
goto errout;
|
||||
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ int tcf_em_tree_validate(struct tcf_proto *tp, struct nlattr *nla,
|
|||
if (!nla)
|
||||
return 0;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, em_policy);
|
||||
err = nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, em_policy, NULL);
|
||||
if (err < 0)
|
||||
goto errout;
|
||||
|
||||
|
|
|
|||
|
|
@ -457,7 +457,7 @@ static struct qdisc_size_table *qdisc_get_stab(struct nlattr *opt)
|
|||
u16 *tab = NULL;
|
||||
int err;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_STAB_MAX, opt, stab_policy);
|
||||
err = nla_parse_nested(tb, TCA_STAB_MAX, opt, stab_policy, NULL);
|
||||
if (err < 0)
|
||||
return ERR_PTR(err);
|
||||
if (!tb[TCA_STAB_BASE])
|
||||
|
|
@ -1131,7 +1131,7 @@ static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n)
|
|||
!netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
err = nlmsg_parse(n, sizeof(*tcm), tca, TCA_MAX, NULL);
|
||||
err = nlmsg_parse(n, sizeof(*tcm), tca, TCA_MAX, NULL, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
@ -1200,7 +1200,7 @@ static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n)
|
|||
|
||||
replay:
|
||||
/* Reinit, just in case something touches this. */
|
||||
err = nlmsg_parse(n, sizeof(*tcm), tca, TCA_MAX, NULL);
|
||||
err = nlmsg_parse(n, sizeof(*tcm), tca, TCA_MAX, NULL, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
@ -1515,7 +1515,7 @@ static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb)
|
|||
idx = 0;
|
||||
ASSERT_RTNL();
|
||||
|
||||
err = nlmsg_parse(nlh, sizeof(*tcm), tca, TCA_MAX, NULL);
|
||||
err = nlmsg_parse(nlh, sizeof(*tcm), tca, TCA_MAX, NULL, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
@ -1577,7 +1577,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n)
|
|||
!netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
err = nlmsg_parse(n, sizeof(*tcm), tca, TCA_MAX, NULL);
|
||||
err = nlmsg_parse(n, sizeof(*tcm), tca, TCA_MAX, NULL, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent,
|
|||
if (opt == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
error = nla_parse_nested(tb, TCA_ATM_MAX, opt, atm_policy);
|
||||
error = nla_parse_nested(tb, TCA_ATM_MAX, opt, atm_policy, NULL);
|
||||
if (error < 0)
|
||||
return error;
|
||||
|
||||
|
|
|
|||
|
|
@ -1137,7 +1137,7 @@ static int cbq_init(struct Qdisc *sch, struct nlattr *opt)
|
|||
struct tc_ratespec *r;
|
||||
int err;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_CBQ_MAX, opt, cbq_policy);
|
||||
err = nla_parse_nested(tb, TCA_CBQ_MAX, opt, cbq_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
@ -1474,7 +1474,7 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **t
|
|||
if (opt == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_CBQ_MAX, opt, cbq_policy);
|
||||
err = nla_parse_nested(tb, TCA_CBQ_MAX, opt, cbq_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ static int choke_change(struct Qdisc *sch, struct nlattr *opt)
|
|||
if (opt == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_CHOKE_MAX, opt, choke_policy);
|
||||
err = nla_parse_nested(tb, TCA_CHOKE_MAX, opt, choke_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ static int codel_change(struct Qdisc *sch, struct nlattr *opt)
|
|||
if (!opt)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_CODEL_MAX, opt, codel_policy);
|
||||
err = nla_parse_nested(tb, TCA_CODEL_MAX, opt, codel_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
|
|||
if (!opt)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_DRR_MAX, opt, drr_policy);
|
||||
err = nla_parse_nested(tb, TCA_DRR_MAX, opt, drr_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ static int dsmark_change(struct Qdisc *sch, u32 classid, u32 parent,
|
|||
if (!opt)
|
||||
goto errout;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_DSMARK_MAX, opt, dsmark_policy);
|
||||
err = nla_parse_nested(tb, TCA_DSMARK_MAX, opt, dsmark_policy, NULL);
|
||||
if (err < 0)
|
||||
goto errout;
|
||||
|
||||
|
|
@ -342,7 +342,7 @@ static int dsmark_init(struct Qdisc *sch, struct nlattr *opt)
|
|||
if (!opt)
|
||||
goto errout;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_DSMARK_MAX, opt, dsmark_policy);
|
||||
err = nla_parse_nested(tb, TCA_DSMARK_MAX, opt, dsmark_policy, NULL);
|
||||
if (err < 0)
|
||||
goto errout;
|
||||
|
||||
|
|
|
|||
|
|
@ -698,7 +698,7 @@ static int fq_change(struct Qdisc *sch, struct nlattr *opt)
|
|||
if (!opt)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_FQ_MAX, opt, fq_policy);
|
||||
err = nla_parse_nested(tb, TCA_FQ_MAX, opt, fq_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -383,7 +383,8 @@ static int fq_codel_change(struct Qdisc *sch, struct nlattr *opt)
|
|||
if (!opt)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_FQ_CODEL_MAX, opt, fq_codel_policy);
|
||||
err = nla_parse_nested(tb, TCA_FQ_CODEL_MAX, opt, fq_codel_policy,
|
||||
NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
if (tb[TCA_FQ_CODEL_FLOWS]) {
|
||||
|
|
|
|||
|
|
@ -401,7 +401,7 @@ static int gred_change(struct Qdisc *sch, struct nlattr *opt)
|
|||
if (opt == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_GRED_MAX, opt, gred_policy);
|
||||
err = nla_parse_nested(tb, TCA_GRED_MAX, opt, gred_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
@ -470,7 +470,7 @@ static int gred_init(struct Qdisc *sch, struct nlattr *opt)
|
|||
if (opt == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_GRED_MAX, opt, gred_policy);
|
||||
err = nla_parse_nested(tb, TCA_GRED_MAX, opt, gred_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -957,7 +957,7 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
|
|||
if (opt == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_HFSC_MAX, opt, hfsc_policy);
|
||||
err = nla_parse_nested(tb, TCA_HFSC_MAX, opt, hfsc_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ static int hhf_change(struct Qdisc *sch, struct nlattr *opt)
|
|||
if (!opt)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_HHF_MAX, opt, hhf_policy);
|
||||
err = nla_parse_nested(tb, TCA_HHF_MAX, opt, hhf_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -1017,7 +1017,7 @@ static int htb_init(struct Qdisc *sch, struct nlattr *opt)
|
|||
if (!opt)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_HTB_MAX, opt, htb_policy);
|
||||
err = nla_parse_nested(tb, TCA_HTB_MAX, opt, htb_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
@ -1342,7 +1342,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
|
|||
if (!opt)
|
||||
goto failure;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_HTB_MAX, opt, htb_policy);
|
||||
err = nla_parse_nested(tb, TCA_HTB_MAX, opt, htb_policy, NULL);
|
||||
if (err < 0)
|
||||
goto failure;
|
||||
|
||||
|
|
|
|||
|
|
@ -843,7 +843,7 @@ static int parse_attr(struct nlattr *tb[], int maxtype, struct nlattr *nla,
|
|||
|
||||
if (nested_len >= nla_attr_size(0))
|
||||
return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len),
|
||||
nested_len, policy);
|
||||
nested_len, policy, NULL);
|
||||
|
||||
memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1));
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ static int pie_change(struct Qdisc *sch, struct nlattr *opt)
|
|||
if (!opt)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_PIE_MAX, opt, pie_policy);
|
||||
err = nla_parse_nested(tb, TCA_PIE_MAX, opt, pie_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -418,7 +418,8 @@ static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
err = nla_parse_nested(tb, TCA_QFQ_MAX, tca[TCA_OPTIONS], qfq_policy);
|
||||
err = nla_parse_nested(tb, TCA_QFQ_MAX, tca[TCA_OPTIONS], qfq_policy,
|
||||
NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ static int red_change(struct Qdisc *sch, struct nlattr *opt)
|
|||
if (opt == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_RED_MAX, opt, red_policy);
|
||||
err = nla_parse_nested(tb, TCA_RED_MAX, opt, red_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -495,7 +495,7 @@ static int sfb_change(struct Qdisc *sch, struct nlattr *opt)
|
|||
int err;
|
||||
|
||||
if (opt) {
|
||||
err = nla_parse_nested(tb, TCA_SFB_MAX, opt, sfb_policy);
|
||||
err = nla_parse_nested(tb, TCA_SFB_MAX, opt, sfb_policy, NULL);
|
||||
if (err < 0)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ static int tbf_change(struct Qdisc *sch, struct nlattr *opt)
|
|||
s64 buffer, mtu;
|
||||
u64 rate64 = 0, prate64 = 0;
|
||||
|
||||
err = nla_parse_nested(tb, TCA_TBF_MAX, opt, tbf_policy);
|
||||
err = nla_parse_nested(tb, TCA_TBF_MAX, opt, tbf_policy, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue