summaryrefslogtreecommitdiffstats
path: root/etc/network.subr
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2009-08-29 19:45:03 +0000
committerdougb <dougb@FreeBSD.org>2009-08-29 19:45:03 +0000
commit7f126d8777dcc4af63b47d469ba7211b1bc44ec6 (patch)
treea7de667026c9c102316486873a4170d274e646d9 /etc/network.subr
parente6601d6a3c0f000ba9ffb5b935d76db8d16cabf1 (diff)
downloadFreeBSD-src-7f126d8777dcc4af63b47d469ba7211b1bc44ec6.zip
FreeBSD-src-7f126d8777dcc4af63b47d469ba7211b1bc44ec6.tar.gz
MFC 196478:
Prior to the dire warning about values of network_interfaces other than AUTO the biggest mistake users made was leaving lo0 off the list. Since lo0 is effectively mandatory, check for it and add it to the list if it's not there. MFC 196523: Improve the case test to detect the presence of lo0 in the list of network_interfaces. Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: re (kib)
Diffstat (limited to 'etc/network.subr')
-rw-r--r--etc/network.subr7
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/network.subr b/etc/network.subr
index c093417..e794fab 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -727,6 +727,13 @@ list_net_interfaces()
;;
*)
_tmplist="${network_interfaces} ${cloned_interfaces}"
+
+ # lo0 is effectively mandatory, so help prevent foot-shooting
+ #
+ case "$_tmplist" in
+ lo0|'lo0 '*|*' lo0'|*' lo0 '*) ;; # This is fine, do nothing
+ *) _tmplist="lo0 ${_tmplist}" ;;
+ esac
;;
esac
OpenPOWER on IntegriCloud