aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_u32.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/cls_u32.c')
-rw-r--r--net/sched/cls_u32.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index c7c27bc91b5a..eb07a1e536e6 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -488,15 +488,15 @@ static const struct nla_policy u32_policy[TCA_U32_MAX + 1] = {
488 [TCA_U32_MARK] = { .len = sizeof(struct tc_u32_mark) }, 488 [TCA_U32_MARK] = { .len = sizeof(struct tc_u32_mark) },
489}; 489};
490 490
491static int u32_set_parms(struct tcf_proto *tp, unsigned long base, 491static int u32_set_parms(struct net *net, struct tcf_proto *tp,
492 struct tc_u_hnode *ht, 492 unsigned long base, struct tc_u_hnode *ht,
493 struct tc_u_knode *n, struct nlattr **tb, 493 struct tc_u_knode *n, struct nlattr **tb,
494 struct nlattr *est) 494 struct nlattr *est)
495{ 495{
496 int err; 496 int err;
497 struct tcf_exts e; 497 struct tcf_exts e;
498 498
499 err = tcf_exts_validate(tp, tb, est, &e, &u32_ext_map); 499 err = tcf_exts_validate(net, tp, tb, est, &e, &u32_ext_map);
500 if (err < 0) 500 if (err < 0)
501 return err; 501 return err;
502 502
@@ -544,7 +544,7 @@ errout:
544 return err; 544 return err;
545} 545}
546 546
547static int u32_change(struct sk_buff *in_skb, 547static int u32_change(struct net *net, struct sk_buff *in_skb,
548 struct tcf_proto *tp, unsigned long base, u32 handle, 548 struct tcf_proto *tp, unsigned long base, u32 handle,
549 struct nlattr **tca, 549 struct nlattr **tca,
550 unsigned long *arg) 550 unsigned long *arg)
@@ -570,7 +570,8 @@ static int u32_change(struct sk_buff *in_skb,
570 if (TC_U32_KEY(n->handle) == 0) 570 if (TC_U32_KEY(n->handle) == 0)
571 return -EINVAL; 571 return -EINVAL;
572 572
573 return u32_set_parms(tp, base, n->ht_up, n, tb, tca[TCA_RATE]); 573 return u32_set_parms(net, tp, base, n->ht_up, n, tb,
574 tca[TCA_RATE]);
574 } 575 }
575 576
576 if (tb[TCA_U32_DIVISOR]) { 577 if (tb[TCA_U32_DIVISOR]) {
@@ -656,7 +657,7 @@ static int u32_change(struct sk_buff *in_skb,
656 } 657 }
657#endif 658#endif
658 659
659 err = u32_set_parms(tp, base, ht, n, tb, tca[TCA_RATE]); 660 err = u32_set_parms(net, tp, base, ht, n, tb, tca[TCA_RATE]);
660 if (err == 0) { 661 if (err == 0) {
661 struct tc_u_knode **ins; 662 struct tc_u_knode **ins;
662 for (ins = &ht->ht[TC_U32_HASH(handle)]; *ins; ins = &(*ins)->next) 663 for (ins = &ht->ht[TC_U32_HASH(handle)]; *ins; ins = &(*ins)->next)