diff options
-rwxr-xr-x | src/usr/local/sbin/ppp-linkdown | 4 | ||||
-rwxr-xr-x | src/usr/local/sbin/ppp-linkup | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/usr/local/sbin/ppp-linkdown b/src/usr/local/sbin/ppp-linkdown index 62d07ed..94e72d0 100755 --- a/src/usr/local/sbin/ppp-linkdown +++ b/src/usr/local/sbin/ppp-linkdown @@ -1,6 +1,7 @@ #!/bin/sh IF="${1}" +PROTOCOL="${2}" LOCAL_IP="${3}" if [ -f /tmp/${IF}up ] && [ -f /conf/${IF}.log ]; then @@ -15,6 +16,9 @@ if [ -s "/tmp/${IF}_defaultgw" ]; then [ -n "${GW}" ] \ && /sbin/route delete default ${GW} fi +if [ "${PROTOCOL}" == "inet6" ]; then + /usr/local/sbin/ppp-ipv6 ${IF} down +fi # delete the node just in case mpd cannot do that /usr/sbin/ngctl shutdown ${IF}: if [ -f "/var/etc/nameserver_${IF}" ]; then diff --git a/src/usr/local/sbin/ppp-linkup b/src/usr/local/sbin/ppp-linkup index e6604a3..76936b4 100755 --- a/src/usr/local/sbin/ppp-linkup +++ b/src/usr/local/sbin/ppp-linkup @@ -37,6 +37,7 @@ if [ "${2}" == "inet" ]; then pfSctl -c "interface newip ${1}" elif [ "${2}" == "inet6" ]; then + /usr/local/sbin/ppp-ipv6 ${1} up # let the configuration system know that the ipv6 has changed. echo ${4} |cut -d% -f1 > /tmp/${1}_routerv6 echo ${3} |cut -d% -f1 > /tmp/${1}_ipv6 |