From 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 Mon Sep 17 00:00:00 2001 From: wbx Date: Sun, 17 May 2009 14:41:34 +0200 Subject: Initial import --- package/busybox/files/ipv6 | 71 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 package/busybox/files/ipv6 (limited to 'package/busybox/files/ipv6') diff --git a/package/busybox/files/ipv6 b/package/busybox/files/ipv6 new file mode 100644 index 000000000..837106519 --- /dev/null +++ b/package/busybox/files/ipv6 @@ -0,0 +1,71 @@ +#!/bin/sh + +ipv6_up() { + env | grep -q IF_IPV6_ || return 0 + + # IPV6-FLUSH + if [ "$IF_IPV6_FLUSH" == "1" ] || [ "$IF_IPV6_FLUSH" == "yes" ] || [ "$IF_IPV6_FLUSH" == "YES" ] + then + ip -6 addr flush $IFACE + logger -t IPv6 "deactivated IPv6 for interface $IFACE" + fi + # IPV6-AUTOCONF + if [ "$IF_IPV6_AUTOCONF" == "1" ] || [ "$IF_IPV6_AUTOCONF" == "yes" ] || [ "$IF_IPV6_AUTOCONF" == "YES" ] + then + echo 1 > /proc/sys/net/ipv6/conf/$IFACE/autoconf + logger -t IPv6 "autoconf enabled for $IFACE" + fi + if [ "$IF_IPV6_AUTOCONF" == "0" ] || [ "$IF_IPV6_AUTOCONF" == "no" ] || [ "$IF_IPV6_AUTOCONF" == "NO" ] + then + echo 0 > /proc/sys/net/ipv6/conf/$IFACE/autoconf + logger -t IPv6 "autoconf disabled for $IFACE" + fi + # IPV6-ACCEPT-RA + if [ "$IF_IPV6_ACCEPT_RA" == "1" ] || [ "$IF_IPV6_ACCEPT_RA" == "yes" ] || [ "$IF_IPV6_ACCEPT_RA" == "YES" ] + then + + echo 1 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra + logger -t IPv6 "accept-ra enabled for $IFACE" + fi + if [ "$IF_IPV6_ACCEPT_RA" == "0" ] || [ "$IF_IPV6_ACCEPT_RA" == "no" ] || [ "$IF_IPV6_ACCEPT_RA" == "NO" ] + then + echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra + logger -t IPv6 "accept-ra disabled for $IFACE" + fi + # IPV6-ACCEPT-REDIRECTS + if [ "$IF_IPV6_ACCEPT_REDIRECTS" == "1" ] || [ "$IF_IPV6_ACCEPT_REDIRECTS" == "yes" ] || [ "$IF_IPV6_ACCEPT_REDIRECTS" == "YES" ] + then + + echo 1 > /proc/sys/net/ipv6/conf/$IFACE/accept_redirects + logger -t IPv6 "accept-redirects enabled for $IFACE" + fi + if [ "$IF_IPV6_ACCEPT_REDIRECTS" == "0" ] || [ "$IF_IPV6_ACCEPT_REDIRECTS" == "no" ] || [ "$IF_IPV6_ACCEPT_REDIRECTS" == "NO" ] + then + echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_redirects + logger -t IPv6 "accept-redirects disabled for $IFACE" + fi + # IPV6-FORWARDING + if [ "$IF_IPV6_FORWARDING" == "1" ] || [ "$IF_IPV6_FORWARDING" == "yes" ] || [ "$IF_IPV6_FORWARDING" == "YES" ] + then + + echo 1 > /proc/sys/net/ipv6/conf/$IFACE/forwarding + logger -t IPv6 "forwarding enabled for $IFACE" + fi + if [ "$IF_IPV6_FORWARDING" == "0" ] || [ "$IF_IPV6_FORWARDING" == "no" ] || [ "$IF_IPV6_FORWARDING" == "NO" ] + then + echo 0 > /proc/sys/net/ipv6/conf/$IFACE/forwarding + logger -t IPv6 "forwarding disabled for $IFACE" + fi + # IPV6-USE-TEMPADDR + if [ "$IF_IPV6_USE_TEMPADDR" == "1" ] || [ "$IF_IPV6_USE_TEMPADDR" == "yes" ] || [ "$IF_IPV6_USE_TEMPADDR" == "YES" ] + then + + echo 1 > /proc/sys/net/ipv6/conf/$IFACE/use_tempaddr + logger -t IPv6 "use_tempaddr enabled for $IFACE" + fi + if [ "$IF_IPV6_USE_TEMPADDR" == "0" ] || [ "$IF_IPV6_USE_TEMPADDR" == "no" ] || [ "$IF_IPV6_USE_TEMPADDR" == "NO" ] + then + echo 0 > /proc/sys/net/ipv6/conf/$IFACE/use_tempaddr + logger -t IPv6 "use_tempaddr disabled for $IFACE" + fi +} -- cgit v1.2.3