aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_flow.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c
index 8d7698621f0a..eeb223cf14cf 100644
--- a/net/sched/cls_flow.c
+++ b/net/sched/cls_flow.c
@@ -402,12 +402,13 @@ static int flow_change(struct tcf_proto *tp, unsigned long base,
402 402
403 if (tb[TCA_FLOW_KEYS]) { 403 if (tb[TCA_FLOW_KEYS]) {
404 keymask = nla_get_u32(tb[TCA_FLOW_KEYS]); 404 keymask = nla_get_u32(tb[TCA_FLOW_KEYS]);
405 if (fls(keymask) - 1 > FLOW_KEY_MAX)
406 return -EOPNOTSUPP;
407 405
408 nkeys = hweight32(keymask); 406 nkeys = hweight32(keymask);
409 if (nkeys == 0) 407 if (nkeys == 0)
410 return -EINVAL; 408 return -EINVAL;
409
410 if (fls(keymask) - 1 > FLOW_KEY_MAX)
411 return -EOPNOTSUPP;
411 } 412 }
412 413
413 err = tcf_exts_validate(tp, tb, tca[TCA_RATE], &e, &flow_ext_map); 414 err = tcf_exts_validate(tp, tb, tca[TCA_RATE], &e, &flow_ext_map);