DragonFly BSD
DragonFly submit List (threaded) for 2005-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

/etc/network.subr list_net_interfaces() fix


From: Chris Csanady <cc@xxxxxxx>
Date: Thu, 22 Dec 2005 06:59:48 -0600


By the time list_net_interfaces() is called in /etc/rc.d/netif, clone_up() has
already created each of $cloned_interfaces. At this point, they will be
shown by the 'ifconfig -l', so there is no need to explicitly append them.
In doing so, the cloned interfaces are configured and listed twice.


clone_up() is called from network_start(), before network_common() in
/etc/rc.d/netif. list_net_interfaces() is only called from network_common()
and /etc/rc.d/dhclient, which is itself dependent on netif. Therefore,
appending the cloned interface list here will always result in duplicates.



--- /usr/src/etc/network.subr 2003-07-24 01:35:32.000000000 -0500 +++ /etc/network.subr 2005-12-22 05:50:49.000000000 -0600 @@ -270,17 +270,16 @@ case ${network_interfaces} in [Aa][Uu][Tt][Oo]) _tmplist="`ifconfig -l`" ;; *) _tmplist="${network_interfaces}" ;; esac - _tmplist="${_tmplist} ${cloned_interfaces}"

        if [ -z "$type" ]; then
                echo $_tmplist
                return 0
        fi

        # Separate out dhcp and non-dhcp intefraces
        #


Chris




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