Index: net/ifconfig.sh =================================================================== --- net/ifconfig.sh (revision 2418) +++ net/ifconfig.sh (working copy) @@ -364,7 +364,7 @@ x="-net ${x}" elif [[ ${y} == *.*.*.*/32 ]] ; then x="-host ${x}" - elif [[ ${y} == *.*.*.*/* ]] ; then + elif [[ ${y} == *.*.*.*/* || ${y} == "default" || ${y} == "0.0.0.0" ]] ; then x="-net ${x}" else # Given the lack of a netmask, we assume a host @@ -430,12 +430,12 @@ config=( "${config[@]//peer/pointopoint}" ) fi - # Ensure that the interface is up so we can add IPv6 addresses - interface_up "${real_iface}" - # Some kernels like to apply lo with an address when they are brought up if [[ ${config[@]} == "127.0.0.1 netmask 255.0.0.0 broadcast 127.255.255.255" ]]; then - is_loopback "${iface}" && ifconfig "${iface}" 0.0.0.0 + if is_loopback "${real_iface}" ; then + ifconfig "${real_iface}" ${config[@]} + return 0 + fi fi ifconfig "${iface}" ${config[@]}