Page MenuHomeVyOS Platform

Prevent deletion of bridge member interfaces
Resolved (N/A)PublicBUG

Description

Interfaces assigned to a bridge should not be allowed to be deleted. If an interface is deleted from the config, the subsequent boot will fail with a configuration error as one of the bridge interfaces is mirring.

This is true for the following interfaces:

  • bonding
  • dummy
  • geneve
  • l2tpv3
  • openvpn
  • pseudo-ethernet
  • tunnel -> @thomas-mangin please add this as I do not understand that code
  • vti (to be done on interface rewrite)
  • vxlan
  • wireguard -> not fully supported by current wireguard implementation (deleting all wireguard interfaces does not trigger the check) Fixed in T2244
  • wireless
  • wirelessmodem

Details

Difficulty level
Easy (less than an hour)
Version
1.3-rolling-20200405
Why the issue appeared?
Design mistake
Is it a breaking change?
Stricter validation
Issue type
Bug (incorrect behavior)

Event Timeline

c-po created this task.
c-po changed Why the issue appeared? from Will be filled on close to Design mistake.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Stricter validation.
c-po renamed this task from l2tpv3 interface can be deleted while it is still assigned to a bridge to Prevent deletion of bridge member interfaces.Apr 7 2020, 6:45 PM
c-po changed the task status from Open to In progress.
c-po updated the task description. (Show Details)
c-po updated the task description. (Show Details)
c-po added a subscriber: thomas-mangin.

@cpo AFAIU the patches are not right as the code making use of Config() in the verify() section and AFAIU this is against the separation between get_config()

Yes - there are some parts which make use of this bad practice (mostly introduced by me), cleanup required.

THos parts can be read in get_config() and evaluated in verify() instead. Let us coordinate on Slack.

c-po updated the task description. (Show Details)
erkin set Issue type to Bug (incorrect behavior).Aug 30 2021, 7:38 AM
erkin removed a subscriber: Active contributors.
Viacheslav changed the task status from In progress to Needs testing.Jan 20 2024, 12:49 AM
Viacheslav triaged this task as Normal priority.
dmbaturin added a project: Restricted Project.
Viacheslav added a subscriber: Viacheslav.

Fixed, VyOS 1.5-rolling-202404240023

vyos@r4# run show conf com | match "bri|tun0"
set interfaces bridge br0 member interface tun0
set interfaces tunnel tun0 encapsulation 'gretap'
set interfaces tunnel tun0 remote '192.168.122.111'
set interfaces tunnel tun0 source-address '192.168.122.14'
[edit]
vyos@r4# delete interfaces tunnel 
[edit]
vyos@r4# commit
[ interfaces tunnel tun0 ]
Interface "tun0" cannot be deleted as it is a member of bridge "br0"!

delete [ interfaces tunnel tun0 ] failed
Commit failed
[edit]
vyos@r4#