Project

General

Profile

Actions

Bug #4595

closed

Input validation for bridge creation does not prevent adding the same interface to multiple bridges

Added by Jim Pingle over 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Interfaces
Target version:
Start date:
04/09/2015
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
All
Affected Architecture:
All

Description

When creating a bridge, it is possible to create multiple bridges which contain the same interface(s), which is invalid.

For example, with OPT3 (em3), OPT4 (em4), and OPT5 (em5) I am able to create two bridges in the GUI: OPT3+OPT4, OPT4+OPT5, but in the OS the second bridge is missing OPT4 since it cannot be on two bridges at once:

: ifconfig -a
[...]
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 02:fb:d1:bb:af:00
    nd6 options=1<PERFORMNUD>
    id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
    maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
    root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
    member: em4 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 5 priority 128 path cost 20000
    member: em3 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 4 priority 128 path cost 20000
bridge1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 02:fb:d1:bb:af:01
    nd6 options=1<PERFORMNUD>
    id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
    maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
    root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
    member: em5 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 6 priority 128 path cost 20000

: ifconfig bridge1 addm em4
ifconfig: BRDGADD em4: Device busy

The bridge "Member interfaces" list in the GUI should either remove or disable entries for interfaces that are already on other bridges, and present an error if a bridge is saved that somehow contains overlapping interfaces.

Actions #1

Updated by Chris Buechler over 10 years ago

  • Target version changed from 2.2.3 to 2.3
Actions #2

Updated by Jim Thompson almost 10 years ago

  • Assignee set to Matthew Smith
Actions #3

Updated by Luiz Souza almost 10 years ago

  • Status changed from Confirmed to Feedback
  • % Done changed from 0 to 100

Added a warning that prevents the same interface be in multiple bridges.

aa4c2db3

Actions #4

Updated by Chris Buechler almost 10 years ago

  • Status changed from Feedback to Resolved

works

Actions

Also available in: Atom PDF