Message ID | 20230621141528.1034485-2-cengiz.can@canonical.com |
---|---|
State | New |
Headers | show |
Series | [SRU,OEM-5.17,OEM-6.0,1/1] net: sched: disallow noqueue for qdisc classes | expand |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 67ee8ae3f310..bb9542a516ac 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -1114,6 +1114,11 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, return -ENOENT; } + if (new && new->ops == &noqueue_qdisc_ops) { + NL_SET_ERR_MSG(extack, "Cannot assign noqueue to a class"); + return -EINVAL; + } + err = cops->graft(parent, cl, new, &old, extack); if (err) return err;