Commit 0d8fd254 authored by Patrick McHardy's avatar Patrick McHardy

[PKT_SCHED]: tcf_exts: rate_tlv is optional

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent 8d7c6945
......@@ -479,7 +479,7 @@ tcf_exts_validate(struct tcf_proto *tp, struct rtattr **tb,
int err;
struct tc_action *act;
if (map->police && tb[map->police-1] && rate_tlv) {
if (map->police && tb[map->police-1]) {
act = tcf_action_init_1(tb[map->police-1], rate_tlv, "police",
TCA_ACT_NOREPLACE, TCA_ACT_BIND, &err);
if (act == NULL)
......@@ -487,7 +487,7 @@ tcf_exts_validate(struct tcf_proto *tp, struct rtattr **tb,
act->type = TCA_OLD_COMPAT;
exts->action = act;
} else if (map->action && tb[map->action-1] && rate_tlv) {
} else if (map->action && tb[map->action-1]) {
act = tcf_action_init(tb[map->action-1], rate_tlv, NULL,
TCA_ACT_NOREPLACE, TCA_ACT_BIND, &err);
if (act == NULL)
......@@ -496,7 +496,7 @@ tcf_exts_validate(struct tcf_proto *tp, struct rtattr **tb,
exts->action = act;
}
#elif defined CONFIG_NET_CLS_POLICE
if (map->police && tb[map->police-1] && rate_tlv) {
if (map->police && tb[map->police-1]) {
struct tcf_police *p;
p = tcf_police_locate(tb[map->police-1], rate_tlv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment