Skip to content

Commit

Permalink
pkt_sched: Fix "parent is root" test in qdisc_create().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Aug 7, 2008
1 parent 11d4612 commit ee7af82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/sch_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ee7af82

Please sign in to comment.