diff options
Diffstat (limited to 'net/ifconfig.sh.Linux.in')
-rw-r--r-- | net/ifconfig.sh.Linux.in | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/ifconfig.sh.Linux.in b/net/ifconfig.sh.Linux.in index 8c887fbc..1708724f 100644 --- a/net/ifconfig.sh.Linux.in +++ b/net/ifconfig.sh.Linux.in @@ -182,7 +182,12 @@ _add_address() _add_route() { - local inet6= + local inet6= family= + + if [ "$1" = "-A" -o "$1" = "-f" -o "$1" = "-family" ]; then + family="-A $2" + shift; shift + fi if [ -n "${metric}" ]; then set -- "$@" metric ${metric} @@ -197,13 +202,10 @@ _add_route() fi case "$@" in - *:*) - inet6="-A inet6" - [ "$1" = "-net" ] && shift - ;; + *:*) [ "$1" = "-net" ] && shift;; esac - route ${inet6} add "$@" dev "${IFACE}" + route ${family} add "$@" dev "${IFACE}" } _delete_addresses() |