aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-07 23:26:40 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-07 23:26:40 -0400
commit827ebd6410005b05b3c930ef6a116666c6986886 (patch)
tree7b9c0fcf0b6f1502620453c5050d68e8e9325caa /net
parent22c7fdf4a7acfa24d9d498b1357e6c07d0e6c553 (diff)
pkt_sched: Fix qdisc config when link is down.
Bug reported by Stephen Hemminger. We need to fetch the root from ->qdisc_sleeping not ->qdisc. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sched/sch_api.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 83b23b55ce36..ba1d121f3127 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -189,7 +189,7 @@ struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle)
189 189
190 for (i = 0; i < dev->num_tx_queues; i++) { 190 for (i = 0; i < dev->num_tx_queues; i++) {
191 struct netdev_queue *txq = netdev_get_tx_queue(dev, i); 191 struct netdev_queue *txq = netdev_get_tx_queue(dev, i);
192 struct Qdisc *q, *txq_root = txq->qdisc; 192 struct Qdisc *q, *txq_root = txq->qdisc_sleeping;
193 193
194 if (!(txq_root->flags & TCQ_F_BUILTIN) && 194 if (!(txq_root->flags & TCQ_F_BUILTIN) &&
195 txq_root->handle == handle) 195 txq_root->handle == handle)
@@ -793,7 +793,7 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue,
793 } 793 }
794 } 794 }
795 if ((parent != TC_H_ROOT) && !(sch->flags & TCQ_F_INGRESS)) 795 if ((parent != TC_H_ROOT) && !(sch->flags & TCQ_F_INGRESS))
796 list_add_tail(&sch->list, &dev_queue->qdisc->list); 796 list_add_tail(&sch->list, &dev_queue->qdisc_sleeping->list);
797 797
798 return sch; 798 return sch;
799 } 799 }
@@ -1236,11 +1236,11 @@ static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb)
1236 q_idx = 0; 1236 q_idx = 0;
1237 1237
1238 dev_queue = netdev_get_tx_queue(dev, 0); 1238 dev_queue = netdev_get_tx_queue(dev, 0);
1239 if (tc_dump_qdisc_root(dev_queue->qdisc, skb, cb, &q_idx, s_q_idx) < 0) 1239 if (tc_dump_qdisc_root(dev_queue->qdisc_sleeping, skb, cb, &q_idx, s_q_idx) < 0)
1240 goto done; 1240 goto done;
1241 1241
1242 dev_queue = &dev->rx_queue; 1242 dev_queue = &dev->rx_queue;
1243 if (tc_dump_qdisc_root(dev_queue->qdisc, skb, cb, &q_idx, s_q_idx) < 0) 1243 if (tc_dump_qdisc_root(dev_queue->qdisc_sleeping, skb, cb, &q_idx, s_q_idx) < 0)
1244 goto done; 1244 goto done;
1245 1245
1246cont: 1246cont: