aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
Diffstat (limited to 'network')
-rwxr-xr-xnetwork12
1 files changed, 10 insertions, 2 deletions
diff --git a/network b/network
index a7dd136..26cc9db 100755
--- a/network
+++ b/network
@@ -87,7 +87,11 @@ rtup()
return 1
fi
eval routecfg="\$${1}"
- /sbin/route add $routecfg
+ if grep -q :: <<< $routecfg; then
+ /sbin/route -A inet6 add $routecfg
+ else
+ /sbin/route add $routecfg
+ fi
return $?
}
@@ -98,7 +102,11 @@ rtdown()
return 1
fi
eval routecfg="\$${1}"
- /sbin/route del $routecfg
+ if grep -q :: <<< $routecfg; then
+ /sbin/route -A inet6 del $routecfg
+ else
+ /sbin/route del $routecfg
+ fi
return $?
}