Unverified Commit 1356fff3 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15335 net: sched: Disallow replacing of child qdisc from one parent to another

parents f974aa14 25491e5b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1519,6 +1519,10 @@ static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n,
				q = qdisc_lookup(dev, tcm->tcm_handle);
				if (!q)
					goto create_n_graft;
				if (q->parent != tcm->tcm_parent) {
					NL_SET_ERR_MSG(extack, "Cannot move an existing qdisc to a different parent");
					return -EINVAL;
				}
				if (n->nlmsg_flags & NLM_F_EXCL) {
					NL_SET_ERR_MSG(extack, "Exclusivity flag on, cannot override");
					return -EEXIST;