diff options
author | Bill Nottingham <notting@redhat.com> | 2009-08-14 15:45:17 -0400 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2009-08-21 11:16:29 -0400 |
commit | b9d6488bf46dc6d988785bf7e971c34fa17ae738 (patch) | |
tree | d980e9b2a409233070c9e95a29c2799d94aa92e2 /sysconfig/network-scripts/network-functions-ipv6 | |
parent | cacace806c960f80a7089e379a7d8549eb8be32a (diff) | |
download | initscripts-b9d6488bf46dc6d988785bf7e971c34fa17ae738.tar initscripts-b9d6488bf46dc6d988785bf7e971c34fa17ae738.tar.gz initscripts-b9d6488bf46dc6d988785bf7e971c34fa17ae738.tar.bz2 initscripts-b9d6488bf46dc6d988785bf7e971c34fa17ae738.tar.xz initscripts-b9d6488bf46dc6d988785bf7e971c34fa17ae738.zip |
Remove ipv6_del_route; adjust callers.
Diffstat (limited to 'sysconfig/network-scripts/network-functions-ipv6')
-rw-r--r-- | sysconfig/network-scripts/network-functions-ipv6 | 54 |
1 files changed, 1 insertions, 53 deletions
diff --git a/sysconfig/network-scripts/network-functions-ipv6 b/sysconfig/network-scripts/network-functions-ipv6 index ee77377a..2001f41a 100644 --- a/sysconfig/network-scripts/network-functions-ipv6 +++ b/sysconfig/network-scripts/network-functions-ipv6 @@ -247,58 +247,6 @@ ipv6_add_route() { return 0 } - -# Delete a static IPv6 route -# $1: <IPv6 network> : to route -# $2: <IPv6 gateway> : over which $1 should be routed (if "::", gw will be skipped) -# $3: [<Interface>] : (optional) -# return code: 0=ok 1=argument error 2=IPv6 test fails 3=major problem adding route -ipv6_del_route() { - local fn="ipv6_del_route" - - local networkipv6=$1 - local gatewayipv6=$2 - local device=$3 # maybe empty - - if [ -z "$networkipv6" ]; then - ipv6_log $"Missing parameter 'IPv6-network' (arg 1)" err $fn - return 1 - fi - - if [ -z "$gatewayipv6" ]; then - ipv6_log $"Missing parameter 'IPv6-gateway' (arg 2)" err $fn - return 1 - fi - - ipv6_test testonly || return 2 - - # Test, whether given IPv6 address is valid - ipv6_test_ipv6_addr_valid $networkipv6 || return 1 - ipv6_test_ipv6_addr_valid $gatewayipv6 || return 1 - - if [ -z "$device" ]; then - /sbin/ip -6 route del $networkipv6 via $gatewayipv6 - local result=$? - else - if [ "$gatewayipv6" = "::" ]; then - /sbin/ip -6 route del $networkipv6 dev $device - local result=$? - else - /sbin/ip -6 route del $networkipv6 via $gatewayipv6 dev $device - local result=$? - fi - fi - - if [ $result -eq 2 ]; then - # Netlink: "No such process" - true - elif [ $result -ne 0 ]; then - return 3 - fi - - return 0 -} - ##### automatic tunneling configuration ## Configure automatic tunneling up @@ -447,7 +395,7 @@ ipv6_cleanup_6to4_device() { # Get all IPv6 routes through given interface related to 6to4 and remove them /sbin/ip -6 route show dev $device | LC_ALL=C grep "^2002:" | while read ipv6net dummy; do - ipv6_del_route $ipv6net :: $device + /sbin/ip -6 route del $ipv6net dev $device done return 0 |