FS#16625 - [initscripts] net: support more bridge device
Attached to Project:
Arch Linux
Opened by Dwight Schauer (dschauer) - Tuesday, 13 October 2009, 20:01 GMT
Last edited by Tom Gundersen (tomegun) - Monday, 13 June 2011, 11:52 GMT
Opened by Dwight Schauer (dschauer) - Tuesday, 13 October 2009, 20:01 GMT
Last edited by Tom Gundersen (tomegun) - Monday, 13 June 2011, 11:52 GMT
|
Details
Description:
When working with bridge devices it is often needed to set the forwarding delay to 0 to avoid dhcp and other network timeouts. Additional info: /etc/rc.d/network /etc/conf.d/bridges /etc/rc.conf When one uses the stock example and br0="dhcp" in /etc/rc.conf, it can have problems and dhcpcd may always time out. Steps to reproduce: Set up: /etc/conf.d/bridges: bridge_br0="eth0" BRIDGE_INTERFACES=(br0) /etc/rc.conf: eth0="eth0 0.0.0.0 up" # eth0="eth0 up" rarely works br0="dhcp" INTERFACES=(eth0 br0) Then: /etc/rc.d/network restart On some setups it will be sometimes work, on other setups it will never work. Working solution I'm using: Add the following to /etc/conf.d/bridges: config_br0="brctl setfd br0 0" And apply the following patch to /etc/rc.d/network (Is also attached) ---< start patch >--- --- network.0 2009-10-13 13:05:40.924603683 -0500 +++ network 2009-10-13 13:18:59.534523717 -0500 @@ -172,6 +172,15 @@ /usr/sbin/brctl addif $br $brif || error=1 fi done + eval brconfig="\$config_${br}" + if [ -n "${brconfig}" ]; then + if ${brconfig}; then + true + else + echo config_${br}=\"${brconfig}\" \<-- invalid configuration statement + error=1 + fi + fi fi done } ---< end patch >--- At a mininum, it would be nice if a setting for the forwarding delay was made available. |
This task depends upon
Closed by Tom Gundersen (tomegun)
Monday, 13 June 2011, 11:52 GMT
Reason for closing: Won't implement
Additional comments about closing: Please reopen against netcfg.
Monday, 13 June 2011, 11:52 GMT
Reason for closing: Won't implement
Additional comments about closing: Please reopen against netcfg.
bridge_br0="eth0"
control_br0="setfd br0 0"
BRIDGE_INTERFACES=(br0)
I've updated the patch for /etc/rc.d/network accordingly (attached).
---< start patch #2 >---
--- network.0 2009-10-16 09:27:11.481558619 -0500
+++ network 2009-10-17 23:13:41.831411877 -0500
@@ -172,6 +172,15 @@
/usr/sbin/brctl addif $br $brif || error=1
fi
done
+ eval brcontrol="\$control_${br}"
+ if [ -n "${brcontrol}" ]; then
+ if brctl ${brcontrol}; then
+ true
+ else
+ echo brctl control_${br}=\"${brcontrol}\" \<-- invalid control statement
+ error=1
+ fi
+ fi
fi
done
}
---< end patch #2 >--
I believe this is ok as all the relevant use cases are also covered by other packages in core/extra (netcfg, wicd or networkmanager). So if this feature is already in netcfg I suggest we close this as "won't implement".
I've been dealing with this on my virtualization servers, and it's a real pain when I do a remote reboot and the machine is left inaccessible because the bridge device never gets a dhcp address! :(
Whether or not the deprecation happens, consider this a +1 from someone who (happily) uses Arch for virtualization in a production environment and really requires good bridge support.