From 40f3e2d1a3335d934949a6614c065a81c386a2f8 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 18 Oct 2021 15:02:48 +0200 Subject: Allow VLAN modify without new VLAN ID In our modified kernel we support changing the VLAN priority only without changing the VLAN ID. This is a modification we did in the kernel which is not upstream. Upstream libnl now prevents this setting and rejects such a command. Change the check to only reject VLAN push without a VLAN ID. --- lib/route/act/vlan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/lib/route/act/vlan.c +++ b/lib/route/act/vlan.c @@ -86,8 +86,8 @@ static int vlan_msg_fill(struct rtnl_tc NLA_PUT(msg, TCA_VLAN_PARMS, sizeof(v->v_parm), &v->v_parm); - /* vid is required for PUSH & MODIFY modes */ - if ((v->v_parm.v_action != TCA_VLAN_ACT_POP) && !(v->v_flags & VLAN_F_VID)) + /* vid is required for PUSH mode */ + if ((v->v_parm.v_action == TCA_VLAN_ACT_PUSH) && !(v->v_flags & VLAN_F_VID)) return -NLE_MISSING_ATTR; if (v->v_flags & VLAN_F_VID)