From 1bb31edac899d17e8772096510d802fedc0743cc Mon Sep 17 00:00:00 2001 From: DmitriyEshenko Date: Mon, 20 Apr 2020 17:11:33 +0000 Subject: bridge: T2342: Add check if this is not vif interface --- scripts/vyatta-bridge.pl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'scripts') 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()); } -- cgit v1.2.3