summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-04 20:05:32 +0200
committerGitHub <noreply@github.com>2020-04-04 20:05:32 +0200
commitd5dedfcfc40c9af6d26611c9c10321fc685d76e5 (patch)
tree97061cd8e74692942820dc1fad4b0f5c09a373fe
parent5dd56053319f1af72d8d684151873e559ed1de46 (diff)
parent5001e57811918e65e5c409d11dd6798c28f88c2d (diff)
downloadvyatta-cfg-system-d5dedfcfc40c9af6d26611c9c10321fc685d76e5.tar.gz
vyatta-cfg-system-d5dedfcfc40c9af6d26611c9c10321fc685d76e5.zip
Merge pull request #122 from DmitriyEshenko/crux-fix-br-qinq
bridge: T2045: 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');