diff options
-rwxr-xr-x | sysconfig/network-scripts/ifdown-ipv6 | 6 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 2 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-ipv6 | 8 | ||||
-rw-r--r-- | sysconfig/network-scripts/network-functions | 1 | ||||
-rw-r--r-- | sysconfig/network-scripts/network-functions-ipv6 | 10 |
5 files changed, 14 insertions, 13 deletions
diff --git a/sysconfig/network-scripts/ifdown-ipv6 b/sysconfig/network-scripts/ifdown-ipv6 index c73b65c2..792e1743 100755 --- a/sysconfig/network-scripts/ifdown-ipv6 +++ b/sysconfig/network-scripts/ifdown-ipv6 @@ -69,9 +69,9 @@ if [ $? != 0 -a $? != 11 ]; then fi # Switch some sysctls to secure mode -ipv6_exec_sysctl -w net.ipv6.conf.$DEVICE.forwarding=0 >/dev/null 2>&1 -ipv6_exec_sysctl -w net.ipv6.conf.$DEVICE.accept_ra=0 >/dev/null 2>&1 -ipv6_exec_sysctl -w net.ipv6.conf.$DEVICE.accept_redirects=0 >/dev/null 2>&1 +ipv6_exec_sysctl -w net.ipv6.conf.$SYSCTLDEVICE.forwarding=0 >/dev/null 2>&1 +ipv6_exec_sysctl -w net.ipv6.conf.$SYSCTLDEVICE.accept_ra=0 >/dev/null 2>&1 +ipv6_exec_sysctl -w net.ipv6.conf.$SYSCTLDEVICE.accept_redirects=0 >/dev/null 2>&1 # Test status of tun6to4 device ipv6_test_device_status tun6to4 diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index fa0f91b2..b3628e77 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -280,7 +280,7 @@ else fi if [ -n "$SRCADDR" ]; then - sysctl -w "net.ipv4.conf.${REALDEVICE}.arp_filter=1" >/dev/null 2>&1 + sysctl -w "net.ipv4.conf.${SYSCTLDEVICE}.arp_filter=1" >/dev/null 2>&1 fi # update ARP cache of neighboring computers diff --git a/sysconfig/network-scripts/ifup-ipv6 b/sysconfig/network-scripts/ifup-ipv6 index 1dc14560..24a2e307 100755 --- a/sysconfig/network-scripts/ifup-ipv6 +++ b/sysconfig/network-scripts/ifup-ipv6 @@ -127,9 +127,9 @@ else ipv6_local_auto=0 fi fi -ipv6_exec_sysctl -w net.ipv6.conf.$DEVICE.forwarding=$ipv6_local_forwarding >/dev/null 2>&1 -ipv6_exec_sysctl -w net.ipv6.conf.$DEVICE.accept_ra=$ipv6_local_auto >/dev/null 2>&1 -ipv6_exec_sysctl -w net.ipv6.conf.$DEVICE.accept_redirects=$ipv6_local_auto >/dev/null 2>&1 +ipv6_exec_sysctl -w net.ipv6.conf.$SYSCTLDEVICE.forwarding=$ipv6_local_forwarding >/dev/null 2>&1 +ipv6_exec_sysctl -w net.ipv6.conf.$SYSCTLDEVICE.accept_ra=$ipv6_local_auto >/dev/null 2>&1 +ipv6_exec_sysctl -w net.ipv6.conf.$SYSCTLDEVICE.accept_redirects=$ipv6_local_auto >/dev/null 2>&1 # Set IPv6 MTU, if given if [ -n "$IPV6_MTU" ]; then @@ -145,7 +145,7 @@ fi # Enable IPv6 RFC3041 privacy extensions if desired if [ "$IPV6_PRIVACY" = "rfc3041" ]; then - ipv6_exec_sysctl -w net.ipv6.conf.$DEVICE.use_tempaddr=2 >/dev/null 2>&1 + ipv6_exec_sysctl -w net.ipv6.conf.$SYSCTLDEVICE.use_tempaddr=2 >/dev/null 2>&1 if [ $? -ne 0 ]; then echo $"Cannot enable IPv6 privacy method '$IPV6_PRIVACY', not supported by kernel" fi diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 7469092c..6ae73706 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -121,6 +121,7 @@ source_config () [ -z "$DEVICETYPE" ] && DEVICETYPE=`echo ${DEVICE} | sed "s/[0-9]*$//"` [ -z "$REALDEVICE" -a -n "$PARENTDEVICE" ] && REALDEVICE=$PARENTDEVICE [ -z "$REALDEVICE" ] && REALDEVICE=${DEVICE%%:*} + [ -z "$SYSCTLDEVICE" ] && SYSCTLDEVICE=${REALDEVICE/.//} if [ "${DEVICE}" != "${REALDEVICE}" ]; then ISALIAS=yes else diff --git a/sysconfig/network-scripts/network-functions-ipv6 b/sysconfig/network-scripts/network-functions-ipv6 index 33f8c59d..f9cb5500 100644 --- a/sysconfig/network-scripts/network-functions-ipv6 +++ b/sysconfig/network-scripts/network-functions-ipv6 @@ -1138,9 +1138,9 @@ ipv6_add_tunnel_device() { fi # Set sysctls proper (regardless "default") - ipv6_exec_sysctl -w net.ipv6.conf.$device.forwarding=1 >/dev/null 2>&1 - ipv6_exec_sysctl -w net.ipv6.conf.$device.accept_ra=0 >/dev/null 2>&1 - ipv6_exec_sysctl -w net.ipv6.conf.$device.accept_redirects=0 >/dev/null 2>&1 + ipv6_exec_sysctl -w net.ipv6.conf.$SYSCTLDEVICE.forwarding=1 >/dev/null 2>&1 + ipv6_exec_sysctl -w net.ipv6.conf.$SYSCTLDEVICE.accept_ra=0 >/dev/null 2>&1 + ipv6_exec_sysctl -w net.ipv6.conf.$SYSCTLDEVICE.accept_redirects=0 >/dev/null 2>&1 if [ -n "$addressipv6local" ]; then # Setup P-t-P address @@ -1334,13 +1334,13 @@ ipv6_set_mtu() { ipv6_test testonly || return 2 # Check whether key exists - ipv6_exec_sysctl net.ipv6.conf.$device.mtu >/dev/null 2>&1 + ipv6_exec_sysctl net.ipv6.conf.$SYSCTLDEVICE.mtu >/dev/null 2>&1 if [ $? -ne 0 ]; then return 3 fi # Set value - ipv6_exec_sysctl -w net.ipv6.conf.$device.mtu=$ipv6_mtu >/dev/null 2>&1 + ipv6_exec_sysctl -w net.ipv6.conf.$SYSCTLDEVICE.mtu=$ipv6_mtu >/dev/null 2>&1 return 0 } |