From 4febf00c06a027a96b00ae12e1bc077792738985 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 19 Apr 2009 20:05:40 +0000 Subject: Allow family on routes, #152 --- net/ifconfig.sh.Linux.in | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'net/ifconfig.sh.Linux.in') 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() -- cgit v1.2.3