Page MenuHomePhabricator

Cannot add ethernet vif-s vif-c interface to bridge-group
Open, NormalPublicBUG

Description

Scenario/Problem:
I needed to bridge a qnq sub-vlan interface on one port (i.e. eth0.499.30) to a normal vlan interface on another port (i.e. eth1.30), so I created bridge br30, then set the bridge-group bridge to br30 on the normal vlan interface eth1.30, then set the bridge-group bridge to br30 on the qnq sub-vlan interface eth0.499.30, but when commiting the configuration change, the commit fails to set the bridge-group on the qnq sub-vlan interface.

Workaround:
Running

sudo brctl addif br30 eth0.499.30

connects the interface to the bridge as expected, and testing shows that the interfaces/system are performing as expected.

Additional Info:
I'm using the VMware OVA version 1.1.8 as released on the vyos.io site. This installation is on a DoD classified network, so I cannot retrieve any files or data from the system whatsoever! Also, it cannot be connected to the Internet to download updates, so our only option is to use a workaround until a new iso is released with a fix included.

Steps to reproduce:
Deploy VMware OVA with 2 network interfaces

set interface bridge 'br30'
set interface ethernet eth0 vif-s 499 vif-s 30 
set interface ethernet eth0 vif-s 499 vif-c 30 bridge-group bridge br30
set interface ethernet eth1 vif 30
set interface ethernet eth1 vif 30 bridge-group bridge br30
commit

Details

Difficulty level
Unknown (require assessment)
Version
1.1.8
Why the issue appeared?
Will be filled on close

Event Timeline

christopher.crews07 triaged this task as Normal priority.Mar 20 2018, 6:16 PM
christopher.crews07 created this task.
christopher.crews07 created this object in space S1 VyOS Public.
syncer changed the visibility from "Subscribers" to "Public (No Login Required)".
syncer added subscribers: Core Community, Maintainers.
syncer changed the subtype of this task from "Task" to "Bug".Oct 20 2018, 4:51 AM
lbv2rus added a subscriber: lbv2rus.EditedJan 29 2019, 9:20 PM

Hi.
Sorry for bad english.

The problem does not exist in EPA3, with vif-s and vif-c non zero.
But!!!
This code (lines 188-190 in Interface.pm) work wrong when vif-s or vif-c is zero, because zero is false in condition.

$path .= " vif $self->{vif}" if ($self->{vif} && !$self->{vif_c});
$path .= " vif-s $self->{vif} vif-c $self->{vif_c}" if
    ($self->{vif} && $self->{vif_c});

After this fix all works as expected

$path .= " vif $self->{vif}" if (defined($self->{vif}) && !defined($self->{vif_c}));
$path .= " vif-s $self->{vif} vif-c $self->{vif_c}" if
    (defined($self->{vif}) && defined($self->{vif_c}));
pasik added a subscriber: pasik.Mar 12 2019, 6:10 PM