Bug #21

/etc/network.subr list_net_interfaces() fix

Added by cc over 8 years ago. Updated over 7 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:corecode% Done:

0%

Category:-
Target version:-

Description

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

History

#1 Updated by corecode over 8 years ago

Fix committed by dillon, followup fix by myself

Also available in: Atom PDF