aboutsummaryrefslogtreecommitdiff
path: root/sh/net.sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-11-01 22:25:53 +0000
committerRoy Marples <roy@marples.name>2007-11-01 22:25:53 +0000
commit80124a050c626584f19fbac917276946224bcde7 (patch)
treec94990be30f3bf00785a8577fb7ef7cf1bd46f21 /sh/net.sh
parenta1f80bc7a74b5b3b899eadeb63ccfbdec6d860d0 (diff)
Work cleanly with bridges on kernels without TCP, #197791.
Diffstat (limited to 'sh/net.sh')
-rwxr-xr-xsh/net.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/sh/net.sh b/sh/net.sh
index 6c9dd6d9..71017bfc 100755
--- a/sh/net.sh
+++ b/sh/net.sh
@@ -349,7 +349,7 @@ _load_config() {
local fallback="$(_get_array fallback_${IFVAR})"
if [ "${IFACE}" = "lo" -o "${IFACE}" = "lo0" ] ; then
- config="127.0.0.1/8
+ [ "${config}" != "null" ] && config="127.0.0.1/8
${config}"
else
if [ -z "${config}" ] ; then
@@ -495,9 +495,11 @@ start() {
local hidefirstroute=false first=true
local routes="$(_get_array "routes_${IFVAR}")"
if [ "${IFACE}" = "lo" -o "${IFACE}" = "lo0" ] ; then
- routes="127.0.0.0/8 via 127.0.0.1
+ if [ "${config_0}" != "null" ]; then
+ routes="127.0.0.0/8 via 127.0.0.1
${routes}"
- hidefirstroute=true
+ hidefirstroute=true
+ fi
fi
local IFS="$__IFS"
for cmd in ${routes}; do