summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-08 18:49:42 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-20 21:28:53 +0200
commitf8d6ba647e0ef4f1c18302bfb4bebb040f2df95c (patch)
treef6b958c005e2f79f1a3831ac26c9616f366e86a2 /src/conf_mode
parentbebb43450fcca4c086ab1a64be6919441c7c0032 (diff)
downloadvyos-1x-f8d6ba647e0ef4f1c18302bfb4bebb040f2df95c.tar.gz
vyos-1x-f8d6ba647e0ef4f1c18302bfb4bebb040f2df95c.zip
ethernet: T1637: support VLAN {ingress,egress}-qos-mapping
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/interface-ethernet.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/conf_mode/interface-ethernet.py b/src/conf_mode/interface-ethernet.py
index 4aed13a62..c20e551d6 100755
--- a/src/conf_mode/interface-ethernet.py
+++ b/src/conf_mode/interface-ethernet.py
@@ -282,7 +282,12 @@ def apply(eth):
# create VLAN interfaces (vif)
for vif in eth['vif']:
- vlan = e.add_vlan(vif['id'])
+ # QoS priority mapping can only be set during interface creation
+ # so we delete the interface first if required.
+ if vif['egress_qos_changed'] or vif['ingress_qos_changed']:
+ e.del_vlan(vif['id'])
+
+ vlan = e.add_vlan(vif['id'], ingress_qos=vif['ingress_qos'], egress_qos=vif['egress_qos'])
apply_vlan_config(vlan, vif)
return None