From 72d5a535fa15f499938dbfce3020e416aa66b95c Mon Sep 17 00:00:00 2001 From: Doug Barton Date: Sat, 29 Aug 2009 19:45:03 +0000 Subject: [PATCH] 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 Approved by: re (kib) --- etc/network.subr | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/etc/network.subr b/etc/network.subr index c0934174716f..e794faba2d70 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