summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriyEshenko <dmitriy.eshenko@vyos.io>2020-04-04 12:57:52 +0000
committerDmitriyEshenko <dmitriy.eshenko@vyos.io>2020-04-04 13:01:14 +0000
commit5001e57811918e65e5c409d11dd6798c28f88c2d (patch)
tree97061cd8e74692942820dc1fad4b0f5c09a373fe
parent5dd56053319f1af72d8d684151873e559ed1de46 (diff)
downloadvyatta-cfg-system-5001e57811918e65e5c409d11dd6798c28f88c2d.tar.gz
vyatta-cfg-system-5001e57811918e65e5c409d11dd6798c28f88c2d.zip
bridge: T2197: Fix path for QinQ S-VLANs
-rwxr-xr-xscripts/vyatta-bridge.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/vyatta-bridge.pl b/scripts/vyatta-bridge.pl
index 7602c2ce..4d02ed60 100755
--- a/scripts/vyatta-bridge.pl
+++ b/scripts/vyatta-bridge.pl
@@ -47,7 +47,13 @@ die "Unknown interface type $ifname\n"
unless $intf;
my $cfg = new Vyatta::Config;
-$cfg->setLevel($intf->path());
+# Change path for QinQ S-VLAN
+my $vif_s_path = "interfaces $intf->{type} $intf->{dev} vif-s $intf->{vif}";
+if (!$intf->{vif_c} && ($cfg->exists($vif_s_path) or $cfg->existsOrig($vif_s_path))) {
+ $cfg->setLevel($vif_s_path);
+}else {
+ $cfg->setLevel($intf->path());
+}
my $oldbridge = $cfg->returnOrigValue('bridge-group bridge');
my $newbridge = $cfg->returnValue('bridge-group bridge');