ifupdown-ng / ifupdown-ng

flexible ifup/ifdown implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Proposal: missing bridge interfaces to be ignored at start but binded on a service for later use

EasyNetDev opened this issue · comments

Sometime there are situations that we have a bridge configured but one of the interfaces is not available at boot. For example: the driver has an option with fails the driver to load, or an USB adapter that is not available at boot.

My proposal is:

  • Change the function add_ports() in bridge to verify if the interface exist in system. In case it doesn't exist, bind a service ${IFACE}@bridge-port.service which has a binding to the systemctl interface.
  • When the interface came available, the service will trigger a script that will configure the interface as a port of the bridge.
  • The script will check /sys/devices/virtual/net/*/bridge to get all bridges in the system
  • It will check the -p bridge-ports to see which bridge has the interface.
  • Gets allow_untagged, pvid, vids from bridge.
  • It will get all configurations for the interface as bridge port and it will apply the parameters as configure_access_port() or configure_trunk_port()

ifupdown-ng does not have any plan to make use of features of specific service managers such as systemd.