if [ "$WANADDR" == "" ]; then echo"No WAN Address found. This script probably has already been executed." exit 1; fi
PREFIXADDR=$(get_prefix_addr $WANADDR)
echo"WAN Global Addr:"$WANADDR echo"Prefix:"$PREFIXADDR
## Disable the accept_ra on WANIF sysctl net.ipv6.conf.ppp0.accept_ra=0
## Delete the global address of wan interface echo"Removing the global address of WAN interface and LAN interface" flush_global_addr ${WANIF} flush_global_addr ${LANIF}
echo"Deleting prefix route on WAN interface" ip -6 route del ${PREFIXADDR}::/64 dev ${WANIF}
## Move the global address to LAN interface echo"Adding back global address to LAN interface" ip -6 addr add ${PREFIXADDR}::FFFF/64 dev ${LANIF}
## Generate radvd.conf for LAN interface echo"Generate radvd.conf for LAN interface." gen_radvd_conf ${LANIF}${PREFIXADDR} | tee /etc/radvd.conf systemctl restart radvd