diff options
author | Alexander Tsoy <alexander@tsoy.me> | 2013-08-28 09:50:13 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2013-08-28 09:50:13 -0700 |
commit | d0a28ef9f91d74678fb8c40e66a63bacc9f01bac (patch) | |
tree | 2eb4675e705ef4fad78b293439b8356eae9918c2 | |
parent | bonding: update example (diff) | |
download | netifrc-d0a28ef9f91d74678fb8c40e66a63bacc9f01bac.tar.gz netifrc-d0a28ef9f91d74678fb8c40e66a63bacc9f01bac.tar.bz2 netifrc-d0a28ef9f91d74678fb8c40e66a63bacc9f01bac.zip |
ifconfig: support ipv6 routes without default prefix.
ifconfig module does not support IPv6 routes without
default prefix, eg "-net ::/0"
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Gentoo-Bug: 442594
-rw-r--r-- | net/ifconfig.sh.Linux.in | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ifconfig.sh.Linux.in b/net/ifconfig.sh.Linux.in index 2afa66c..b2203cb 100644 --- a/net/ifconfig.sh.Linux.in +++ b/net/ifconfig.sh.Linux.in @@ -208,9 +208,11 @@ _add_route() set -- "${one}" "${two}" gw "$@" fi - case "$@" in - *:*|default*) [ "$1" = "-net" -o "$1" = "-host" ] && shift;; - esac + if [ "$1" = "-net" -o "$1" = "-host" ]; then + if [ "${2##*:}" != "$2" ]; then shift + elif [ "$2" = "default" ]; then shift + fi + fi route ${family} add "$@" dev "${IFACE}" } |