summaryrefslogtreecommitdiffstats
path: root/etc/network.subr
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2009-08-23 19:52:47 +0000
committerdougb <dougb@FreeBSD.org>2009-08-23 19:52:47 +0000
commit7ab124422cfd4a77eab41ee9df0d9c969a85f10e (patch)
tree4069abedacf099eaa1b9f5b049d2114aa0b6e7e7 /etc/network.subr
parentff425aaac46fc161827a7544dc06b1596daa29c0 (diff)
downloadFreeBSD-src-7ab124422cfd4a77eab41ee9df0d9c969a85f10e.zip
FreeBSD-src-7ab124422cfd4a77eab41ee9df0d9c969a85f10e.tar.gz
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.
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 c149854..f3a8560 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 '*) ;; # This is fine, do nothing
+ *) _tmplist="lo0 ${_tmplist}" ;;
+ esac
;;
esac
OpenPOWER on IntegriCloud