Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bridge startup with clone interfaces



brconfig(8) shows how to create a bridge using the shell escape (!) in a /etc/ifconfig.bridge0 file. This may not work if an interface participating in the bridge is also a cloned interface (tap in my case) as it may only be created after the bridge0 interface. (Currently, ifconfig -C returns "bridge" first, so it will not work for any of the cloned interfaces).

My current solution is the split the interface configuration loop in / etc/rc.d/network into two loops, one to create all necessary clones and the other to do the configuration, see patch below.

Is there another way to configure this?

--
    aew

Index: network
===================================================================
RCS file: /cvsroot/src/etc/rc.d/network,v
retrieving revision 1.50
diff -u -r1.50 network
--- network     24 Nov 2005 17:28:45 -0000      1.50
+++ network     20 Apr 2008 15:22:45 -0000
@@ -200,6 +200,9 @@
                                        ipf -y >/dev/null
                                fi
                        fi
+               done
+               for int in $tmp; do
+                       eval args=\$ifconfig_$int
                        if [ -n "$args" ]; then
                                echo -n " $int"
                                ifconfig $int $args


Home | Main Index | Thread Index | Old Index