summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-07 06:35:59 (GMT)
committerDavid S. Miller <davem@davemloft.net>2008-08-07 06:35:59 (GMT)
commitee7af8264dafa0c8c76a8dc596803966c2e29ebc (patch)
tree2dfd9066bcf677ec4b1e7becb39d6f8187961385 /net
parent11d46123bfea068a48483f00518d301f452647fb (diff)
downloadlinux-fsl-qoriq-ee7af8264dafa0c8c76a8dc596803966c2e29ebc.tar.xz
pkt_sched: Fix "parent is root" test in qdisc_create().
As noticed by Stephen Hemminger, the root qdisc is denoted by TC_H_ROOT, not zero. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sched/sch_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 4840aff..83b23b5 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -792,7 +792,7 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue,
goto err_out3;
}
}
- if (parent && !(sch->flags & TCQ_F_INGRESS))
+ if ((parent != TC_H_ROOT) && !(sch->flags & TCQ_F_INGRESS))
list_add_tail(&sch->list, &dev_queue->qdisc->list);
return sch;