Page MenuHomeVyOS Platform

VLAN interfaces with ingress-qos or egress-qos are recreated on every commit, and a QoS mapping that is added or removed alone never reaches the kernel
Open, LowPublicBUG

Description

Interface.update() in python/vyos/ifconfig/interface.py deletes a VLAN interface and creates it again when the QoS mappings of the kernel differ from the configuration. The QoS mappings are only set when the interface is created (VLANIf._create(), ip link add).

Found on rolling 2026.11.22 (VLAN eth0.77 with ingress-qos and egress-qos):

  1. The kernel value was compared as a string with a trailing space, so it never matched. Every commit that reaches the parent interface (for example only a description) deletes and creates every VLAN with a QoS mapping again, the ifindex changes, traffic on it stops for a moment. A smoketest that commits a description change and compares the ifindex fails with 35 != 23.
  2. When both mappings are removed from the configuration, the old mappings stay in the kernel (ingress [(2, 7)], egress [(1, 6)], same ifindex), because nothing is compared when the configuration has no mapping.
  3. A mapping that is added to a running VLAN while the other direction does not change is not applied, because the interface is not created again and the mapping is only set at creation.
  4. The comparison must read a mapping the way the kernel lists it, otherwise values like 01:6, 010, a pair that maps to 0 or the same source twice are different forever: numbers are read like iproute2 does (a leading zero is octal), the VLAN priority has 3 bits (ingress source, egress target), the last pair of a source wins, a pair that maps to 0 is not listed. Checked with 150 random mappings against the kernel, no difference.

Proposed fix: one function vlan_qos_changed() compares both directions with this model. Interface.update() and other code that has to know if a VLAN will be recreated use it. The task of VPP MPLS (T9518) needs it: MPLS in VPP is switched off on a VLAN before it is recreated.

Details

Version
rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

rherold created this object in space S1 VyOS Public.

Can't create the PR cause " You've reached the open pull request limit for this repository "

Viacheslav changed the subtype of this task from "Task" to "Bug".Sat, Nov 28, 10:26 AM