aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2009-07-31 18:41:53 -0400
committerBill Nottingham <notting@redhat.com>2009-07-31 21:00:13 -0400
commit0c855e95ce0535ab04905ac7954e57302d083bde (patch)
tree0c17dd5b0d95d6aa89d48db4a65675b6a2f18cd3 /sysconfig/network-scripts
parente0149432e9315ceeccce7aefcaf8f86cee978973 (diff)
downloadinitscripts-0c855e95ce0535ab04905ac7954e57302d083bde.tar
initscripts-0c855e95ce0535ab04905ac7954e57302d083bde.tar.gz
initscripts-0c855e95ce0535ab04905ac7954e57302d083bde.tar.bz2
initscripts-0c855e95ce0535ab04905ac7954e57302d083bde.tar.xz
initscripts-0c855e95ce0535ab04905ac7954e57302d083bde.zip
Delete functions that are not used.
Diffstat (limited to 'sysconfig/network-scripts')
-rw-r--r--sysconfig/network-scripts/network-functions-ipv6114
1 files changed, 0 insertions, 114 deletions
diff --git a/sysconfig/network-scripts/network-functions-ipv6 b/sysconfig/network-scripts/network-functions-ipv6
index 4945bb6d..ee77377a 100644
--- a/sysconfig/network-scripts/network-functions-ipv6
+++ b/sysconfig/network-scripts/network-functions-ipv6
@@ -191,50 +191,6 @@ ipv6_test() {
return 0
}
-##### Control IPv6 forwarding
-
-# Control IPv6 forwarding
-# $1: yes|no|on|off : control value
-# $2: [<interface>] : (optional), if not given, global IPv6 forwarding is set [OBSOLETE]
-# return code: 0=ok 1=argument error 2=IPv6 test fails
-ipv6_control_forwarding() {
- local fn="ipv6_control_forwarding"
-
- local fw_control=$1
- local fw_device=$2 # maybe empty
-
- if [ -z "$fw_control" ]; then
- ipv6_log $"Missing parameter 'forwarding control' (arg 1)" err $fn
- return 1
- fi
-
- if ! [ "$fw_control" = "yes" -o "$fw_control" = "no" -o "$fw_control" = "on" -o "$fw_control" = "off" ]; then
- ipv6_log $"Forwarding control parameter isn't valid '$fw_control' (arg 1)" err $fn
- return 1
- fi
-
- ipv6_test || return 2
-
- if [ "$fw_control" = "yes" -o "$fw_control" = "on" ]; then
- local status=1
- else
- local status=0
- fi
-
- # Global control? (if no device is given)
- if [ -z "$fw_device" ]; then
- /sbin/sysctl -e -w net.ipv6.conf.all.forwarding=$status >/dev/null 2>&1
- fi
-
- # Per device control (not implemented in kernel)
- if [ -n "$fw_device" ]; then
- ipv6_log $"IPv6 forwarding per device cannot be controlled via sysctl - use netfilter6 instead" warn $fn
- fi
-
- return 0
-}
-
-
##### Static IPv6 route configuration
# Set static IPv6 route
@@ -343,40 +299,6 @@ ipv6_del_route() {
return 0
}
-
-# Delete all static IPv6 routes through a given interface
-# $1: <Interface>
-# $2: [<Gateway>] : to match (optional)
-# return code: 0=ok 1=argument error 2=IPv6 test fails
-ipv6_cleanup_routes() {
- local fn="ipv6_cleanup_routes"
-
- local device=$1
- local gatewaymatch=$2
-
- if [ -z "$device" ]; then
- ipv6_log $"Missing parameter 'device' (arg 1)" err $fn
- return 1
- fi
-
- ipv6_test testonly || return 2
-
- if [ -n "$gatewaymatch" ]; then
- # Get all IPv6 routes (except default link-local and multicast) through given interface via a given gateway and remove them
- /sbin/ip -6 route show dev $device via $gatewaymatch | LC_ALL=C grep -v -w expires | LC_ALL=C egrep -v "^fe80::/64|^ff00::/8" | while read ipv6net dummy; do
- ipv6_del_route $ipv6net $gatewaymatch $device
- done
- else
- # Get all IPv6 routes (except default link-local and multicast) through given interface and remove them
- /sbin/ip -6 route show dev $device | LC_ALL=C grep -v -w expires | LC_ALL=C egrep -v "^fe80::/64|^ff00::/8" | while read ipv6net dummy; do
- ipv6_del_route $ipv6net :: $device
- done
- fi
-
- return 0
-}
-
-
##### automatic tunneling configuration
## Configure automatic tunneling up
@@ -407,42 +329,6 @@ ipv6_enable_autotunnel() {
return 0
}
-
-## Configure automatic tunneling down
-# return code: 0=ok 2=IPv6 test fails 3=major problem
-ipv6_disable_autotunnel() {
- local fn="ipv6_disable_autotunnel"
-
- ipv6_test testonly || return 2
-
- if ipv6_test_device_status sit0; then
-
- # disable IPv6-over-IPv4 tunnels (if a tunnel is no longer up)
- if /sbin/ip -6 route show dev sit0 | LC_ALL=C grep -w via | awk '{ print $3 }' | LC_ALL=C grep -v -q "^::$"; then
- # still existing routes, skip shutdown of sit0
- true
- elif /sbin/ip -6 -o addr show dev sit0 | awk '{ print $4 }' | LC_ALL=C grep -v -q '^::'; then
- # still existing IPv6 addresses, skip shutdown of sit0
- true
- else
- # take down basic tunnel device
- /sbin/sysctl -e -w net.ipv6.conf.sit0.forwarding=0 >/dev/null 2>&1
- /sbin/sysctl -e -w net.ipv6.conf.sit0.accept_ra=0 >/dev/null 2>&1
- /sbin/sysctl -e -w net.ipv6.conf.sit0.accept_redirects=0 >/dev/null 2>&1
-
- /sbin/ip link set sit0 down
-
- if ipv6_test_device_status sit0; then
- ipv6_log $"Tunnel device 'sit0' is still up" err $fn
- return 3
- fi
- fi
- fi
-
- return 0
-}
-
-
##### Interface configuration
## Add an IPv6 address for given interface