Project

General

Profile

Actions

Bug #21

closed

/etc/network.subr list_net_interfaces() fix

Added by cc about 18 years ago. Updated over 17 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

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
  1. Separate out dhcp and non-dhcp intefraces #

Chris

Actions #1

Updated by corecode about 18 years ago

Fix committed by dillon, followup fix by myself

Actions

Also available in: Atom PDF