|
@@ -728,14 +728,14 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent,
|
|
} else {
|
|
} else {
|
|
const struct Qdisc_class_ops *cops = parent->ops->cl_ops;
|
|
const struct Qdisc_class_ops *cops = parent->ops->cl_ops;
|
|
|
|
|
|
- err = -EINVAL;
|
|
|
|
-
|
|
|
|
- if (cops) {
|
|
|
|
|
|
+ err = -EOPNOTSUPP;
|
|
|
|
+ if (cops && cops->graft) {
|
|
unsigned long cl = cops->get(parent, classid);
|
|
unsigned long cl = cops->get(parent, classid);
|
|
if (cl) {
|
|
if (cl) {
|
|
err = cops->graft(parent, cl, new, &old);
|
|
err = cops->graft(parent, cl, new, &old);
|
|
cops->put(parent, cl);
|
|
cops->put(parent, cl);
|
|
- }
|
|
|
|
|
|
+ } else
|
|
|
|
+ err = -ENOENT;
|
|
}
|
|
}
|
|
if (!err)
|
|
if (!err)
|
|
notify_and_destroy(skb, n, classid, old, new);
|
|
notify_and_destroy(skb, n, classid, old, new);
|