Skip to content
Snippets Groups Projects
Commit 5087173e authored by Jamal Hadi Salim's avatar Jamal Hadi Salim Committed by Automerger Merge Worker
Browse files

UPSTREAM: net: sched: Disallow replacing of child qdisc from one parent to another am: 4fd7634f

Original change: https://android-review.googlesource.com/c/kernel/common/+/3548021



Change-Id: Ic0edee0e263cec0d194a74e69fef36f8348eea86
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents da9501e3 4fd7634f
Branches aosp-new/android11-5.4
No related tags found
No related merge requests found
......@@ -1603,6 +1603,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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment