summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-20 19:33:28 +0200
committerGitHub <noreply@github.com>2020-04-20 19:33:28 +0200
commit2883fd1fab83942ff5b0ee6f07262fed6b1a86fe (patch)
tree498c6225dcbf0b357c664e941f8a8e7071fa06fc
parentd5dedfcfc40c9af6d26611c9c10321fc685d76e5 (diff)
parent1bb31edac899d17e8772096510d802fedc0743cc (diff)
downloadvyatta-cfg-system-2883fd1fab83942ff5b0ee6f07262fed6b1a86fe.tar.gz
vyatta-cfg-system-2883fd1fab83942ff5b0ee6f07262fed6b1a86fe.zip
Merge pull request #123 from DmitriyEshenko/crux-fix-01
bridge: T2342: Add check if this is not vif interface
-rwxr-xr-xscripts/vyatta-bridge.pl12
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/vyatta-bridge.pl b/scripts/vyatta-bridge.pl
index 4d02ed60..38ea24ab 100755
--- a/scripts/vyatta-bridge.pl
+++ b/scripts/vyatta-bridge.pl
@@ -48,10 +48,14 @@ die "Unknown interface type $ifname\n"
my $cfg = new Vyatta::Config;
# 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 {
+if ($intf->{vif} && !$intf->{vif_c}) {
+ my $vif_s_path = "interfaces $intf->{type} $intf->{dev} vif-s $intf->{vif}";
+ if ($cfg->exists($vif_s_path) or $cfg->existsOrig($vif_s_path)) {
+ $cfg->setLevel($vif_s_path);
+ } else {
+ $cfg->setLevel($intf->path());
+ }
+} else {
$cfg->setLevel($intf->path());
}