diff options
Diffstat (limited to 'net/sched/sch_prio.c')
-rw-r--r-- | net/sched/sch_prio.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index de889f23f22a..269a6e17c6c4 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <net/ip.h> | 32 | #include <net/ip.h> |
33 | #include <net/route.h> | 33 | #include <net/route.h> |
34 | #include <linux/skbuff.h> | 34 | #include <linux/skbuff.h> |
35 | #include <net/netlink.h> | ||
35 | #include <net/sock.h> | 36 | #include <net/sock.h> |
36 | #include <net/pkt_sched.h> | 37 | #include <net/pkt_sched.h> |
37 | 38 | ||
@@ -61,7 +62,7 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) | |||
61 | *qerr = NET_XMIT_SUCCESS; | 62 | *qerr = NET_XMIT_SUCCESS; |
62 | case TC_ACT_SHOT: | 63 | case TC_ACT_SHOT: |
63 | return NULL; | 64 | return NULL; |
64 | }; | 65 | } |
65 | 66 | ||
66 | if (!q->filter_list ) { | 67 | if (!q->filter_list ) { |
67 | #else | 68 | #else |
@@ -188,13 +189,8 @@ prio_destroy(struct Qdisc* sch) | |||
188 | { | 189 | { |
189 | int prio; | 190 | int prio; |
190 | struct prio_sched_data *q = qdisc_priv(sch); | 191 | struct prio_sched_data *q = qdisc_priv(sch); |
191 | struct tcf_proto *tp; | ||
192 | |||
193 | while ((tp = q->filter_list) != NULL) { | ||
194 | q->filter_list = tp->next; | ||
195 | tcf_destroy(tp); | ||
196 | } | ||
197 | 192 | ||
193 | tcf_destroy_chain(q->filter_list); | ||
198 | for (prio=0; prio<q->bands; prio++) | 194 | for (prio=0; prio<q->bands; prio++) |
199 | qdisc_destroy(q->queues[prio]); | 195 | qdisc_destroy(q->queues[prio]); |
200 | } | 196 | } |
@@ -271,7 +267,7 @@ static int prio_init(struct Qdisc *sch, struct rtattr *opt) | |||
271 | static int prio_dump(struct Qdisc *sch, struct sk_buff *skb) | 267 | static int prio_dump(struct Qdisc *sch, struct sk_buff *skb) |
272 | { | 268 | { |
273 | struct prio_sched_data *q = qdisc_priv(sch); | 269 | struct prio_sched_data *q = qdisc_priv(sch); |
274 | unsigned char *b = skb->tail; | 270 | unsigned char *b = skb_tail_pointer(skb); |
275 | struct tc_prio_qopt opt; | 271 | struct tc_prio_qopt opt; |
276 | 272 | ||
277 | opt.bands = q->bands; | 273 | opt.bands = q->bands; |
@@ -280,7 +276,7 @@ static int prio_dump(struct Qdisc *sch, struct sk_buff *skb) | |||
280 | return skb->len; | 276 | return skb->len; |
281 | 277 | ||
282 | rtattr_failure: | 278 | rtattr_failure: |
283 | skb_trim(skb, b - skb->data); | 279 | nlmsg_trim(skb, b); |
284 | return -1; | 280 | return -1; |
285 | } | 281 | } |
286 | 282 | ||