aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/cls_route.c')
-rw-r--r--net/sched/cls_route.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c
index f1f1dfdf4eb3..2473953a5948 100644
--- a/net/sched/cls_route.c
+++ b/net/sched/cls_route.c
@@ -59,11 +59,6 @@ struct route4_filter {
59 59
60#define ROUTE4_FAILURE ((struct route4_filter *)(-1L)) 60#define ROUTE4_FAILURE ((struct route4_filter *)(-1L))
61 61
62static const struct tcf_ext_map route_ext_map = {
63 .police = TCA_ROUTE4_POLICE,
64 .action = TCA_ROUTE4_ACT
65};
66
67static inline int route4_fastmap_hash(u32 id, int iif) 62static inline int route4_fastmap_hash(u32 id, int iif)
68{ 63{
69 return id & 0xF; 64 return id & 0xF;
@@ -347,7 +342,8 @@ static int route4_set_parms(struct net *net, struct tcf_proto *tp,
347 struct route4_bucket *b; 342 struct route4_bucket *b;
348 struct tcf_exts e; 343 struct tcf_exts e;
349 344
350 err = tcf_exts_validate(net, tp, tb, est, &e, &route_ext_map); 345 tcf_exts_init(&e, TCA_ROUTE4_ACT, TCA_ROUTE4_POLICE);
346 err = tcf_exts_validate(net, tp, tb, est, &e);
351 if (err < 0) 347 if (err < 0)
352 return err; 348 return err;
353 349
@@ -481,7 +477,7 @@ static int route4_change(struct net *net, struct sk_buff *in_skb,
481 if (f == NULL) 477 if (f == NULL)
482 goto errout; 478 goto errout;
483 479
484 tcf_exts_init(&f->exts); 480 tcf_exts_init(&f->exts, TCA_ROUTE4_ACT, TCA_ROUTE4_POLICE);
485 err = route4_set_parms(net, tp, base, f, handle, head, tb, 481 err = route4_set_parms(net, tp, base, f, handle, head, tb,
486 tca[TCA_RATE], 1); 482 tca[TCA_RATE], 1);
487 if (err < 0) 483 if (err < 0)
@@ -590,12 +586,12 @@ static int route4_dump(struct tcf_proto *tp, unsigned long fh,
590 nla_put_u32(skb, TCA_ROUTE4_CLASSID, f->res.classid)) 586 nla_put_u32(skb, TCA_ROUTE4_CLASSID, f->res.classid))
591 goto nla_put_failure; 587 goto nla_put_failure;
592 588
593 if (tcf_exts_dump(skb, &f->exts, &route_ext_map) < 0) 589 if (tcf_exts_dump(skb, &f->exts) < 0)
594 goto nla_put_failure; 590 goto nla_put_failure;
595 591
596 nla_nest_end(skb, nest); 592 nla_nest_end(skb, nest);
597 593
598 if (tcf_exts_dump_stats(skb, &f->exts, &route_ext_map) < 0) 594 if (tcf_exts_dump_stats(skb, &f->exts) < 0)
599 goto nla_put_failure; 595 goto nla_put_failure;
600 596
601 return skb->len; 597 return skb->len;