diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-08-25 09:12:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-08-25 09:12:35 +0000 |
commit | c7fc24dc4420057f103afe8fc64524ebc25c5d37 (patch) | |
tree | 3682407a599b8f9f03fc096298134cafba1c9b2f /net/sched/cls_api.c | |
parent | 1d793fade8b063fde3cf275bf1a5c2d381292cd9 (diff) |
o Merge with Linux 2.1.116.
o New Newport console code.
o New G364 console code.
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r-- | net/sched/cls_api.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 6eae05d7b..0bf7a92f4 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -114,6 +114,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) u32 protocol = TC_H_MIN(t->tcm_info); u32 prio = TC_H_MAJ(t->tcm_info); u32 nprio = prio; + u32 parent = t->tcm_parent; struct device *dev; struct Qdisc *q; struct tcf_proto **back, **chain; @@ -141,9 +142,10 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) return -ENODEV; /* Find qdisc */ - if (!t->tcm_parent) + if (!parent) { q = dev->qdisc_sleeping; - else if ((q = qdisc_lookup(dev, TC_H_MAJ(t->tcm_parent))) == NULL) + parent = q->handle; + } else if ((q = qdisc_lookup(dev, TC_H_MAJ(t->tcm_parent))) == NULL) return -EINVAL; /* Is it classful? */ @@ -151,8 +153,8 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) return -EINVAL; /* Do we search for filter, attached to class? */ - if (TC_H_MIN(t->tcm_parent)) { - cl = cops->get(q, t->tcm_parent); + if (TC_H_MIN(parent)) { + cl = cops->get(q, parent); if (cl == 0) return -ENOENT; } @@ -203,7 +205,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) tp->prio = nprio ? : tcf_auto_prio(*back, prio); tp->q = q; tp->classify = tp_ops->classify; - tp->classid = t->tcm_parent; + tp->classid = parent; err = tp_ops->init(tp); if (err) { kfree(tp); @@ -395,7 +397,7 @@ errout: __initfunc(int tc_filter_init(void)) { #ifdef CONFIG_RTNETLINK - struct rtnetlink_link *link_p = rtnetlink_links[AF_UNSPEC]; + struct rtnetlink_link *link_p = rtnetlink_links[PF_UNSPEC]; /* Setup rtnetlink links. It is made here to avoid exporting large number of public symbols. |