aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ppp/ip-up.ipv6to42
-rwxr-xr-xsysconfig/network-scripts/ifup-ipv62
-rw-r--r--sysconfig/network-scripts/network-functions-ipv650
3 files changed, 3 insertions, 51 deletions
diff --git a/ppp/ip-up.ipv6to4 b/ppp/ip-up.ipv6to4
index 59a3c5f9..aae35f2c 100644
--- a/ppp/ip-up.ipv6to4
+++ b/ppp/ip-up.ipv6to4
@@ -166,7 +166,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
# Cleanup autmatically generated autotunnel (not needed for 6to4)
/sbin/ip -6 route del ::/96 dev tun6to4
- ipv6_del_addr_on_device tun6to4 "::$ipv4addr/128"
+ /sbin/ip -6 addr del tun6to4 "::$ipv4addr/128" dev tun6to4
if [ "$IPV6_CONTROL_RADVD" = "yes" ]; then
# Control running radvd
diff --git a/sysconfig/network-scripts/ifup-ipv6 b/sysconfig/network-scripts/ifup-ipv6
index 4c084bec..29ba8af2 100755
--- a/sysconfig/network-scripts/ifup-ipv6
+++ b/sysconfig/network-scripts/ifup-ipv6
@@ -275,7 +275,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
# Cleanup autmatically generated autotunnel (not needed for 6to4)
/sbin/ip -6 route del ::/96 dev tun6to4
- ipv6_del_addr_on_device tun6to4 "::$ipv4addrlocal/128"
+ /sbin/ip -6 addr del "::$ipv4addrlocal/128" dev tun6to4
if [ "$IPV6_CONTROL_RADVD" = "yes" ]; then
# RADVD is in use, so forwarding of IPv6 packets should be enabled, display warning
diff --git a/sysconfig/network-scripts/network-functions-ipv6 b/sysconfig/network-scripts/network-functions-ipv6
index 2001f41a..6af9c8cb 100644
--- a/sysconfig/network-scripts/network-functions-ipv6
+++ b/sysconfig/network-scripts/network-functions-ipv6
@@ -390,7 +390,7 @@ ipv6_cleanup_6to4_device() {
# Cleanup 6to4 addresses on this device
/sbin/ip -6 addr show dev $dev scope global permanent | LC_ALL=C grep -w inet6 | awk '{ print $2}' | LC_ALL=C grep "^2002:" | while read addr; do
- ipv6_del_addr_on_device ${dev} ${addr}
+ /sbin/ip -6 addr del ${addr} dev ${dev}
done
# Get all IPv6 routes through given interface related to 6to4 and remove them
@@ -402,54 +402,6 @@ ipv6_cleanup_6to4_device() {
}
-## Remove an IPv6 address on given interface
-# $1: <Interface>
-# $2: <IPv6 address>
-# return code: 0=ok 1=argument error 2=IPv6 test fails 3=major problem
-ipv6_del_addr_on_device() {
- local fn="ipv6_del_addr_on_device"
-
- local device=$1
- local address=$2
-
- if [ -z "$device" ]; then
- ipv6_log $"Missing parameter 'device' (arg 1)" err $fn
- return 1
- fi
-
- if [ -z "$address" ]; then
- ipv6_log $"Missing parameter 'IPv6 address' (arg 2)" err $fn
- return 1
- fi
-
- ipv6_test testonly || return 2
-
- ipv6_test_ipv6_addr_valid $address || return 1
-
- # Extract address parts
- local prefixlength_implicit="$(echo $address | awk -F/ '{ print $2 }')"
- local address_implicit="$(echo $address | awk -F/ '{ print $1 }')"
-
- # Check prefix length and using '64' as default
- if [ -z "$prefixlength_implicit" ]; then
- local prefixlength_implicit="64"
- local address="$address_implicit/$prefixlength_implicit"
- fi
-
- /sbin/ip -6 addr del $address dev $device
- local result=$?
-
- if [ $result -eq 2 ]; then
- return 0
- elif [ $result -ne 0 ]; then
- ipv6_log $"Cannot delete IPv6 address '$address' on dev '$device'" err $fn
- return 3
- fi
-
- return 0
-}
-
-
##### Some address test functions
## Test a given IPv6 address for validity