From: <abe...@us...> - 2017-06-07 11:47:25
|
Revision: 8377 http://sourceforge.net/p/astlinux/code/8377 Author: abelbeck Date: 2017-06-07 11:47:22 +0000 (Wed, 07 Jun 2017) Log Message: ----------- wide-dhcpv6, dhcp6c.script, call the optional user script at the end and always perform basic logging and NPTv6 updates. Filter out ULA's. Modified Paths: -------------- branches/1.0/package/wide-dhcpv6/dhcp6c.script Modified: branches/1.0/package/wide-dhcpv6/dhcp6c.script =================================================================== --- branches/1.0/package/wide-dhcpv6/dhcp6c.script 2017-06-06 18:41:06 UTC (rev 8376) +++ branches/1.0/package/wide-dhcpv6/dhcp6c.script 2017-06-07 11:47:22 UTC (rev 8377) @@ -14,6 +14,7 @@ ip -6 -o addr show dev $interface scope global 2>/dev/null | \ sed -n -r -e 's|^.* inet6 ([0-9a-fA-F:]+)/.*$|\1|p' | \ + grep -i -v '^fd' | \ head -n1 } @@ -132,6 +133,21 @@ ## Create dhcp6c_cache file setup_env +if [ -n "$dhcp6c_prefix" ]; then + case "$dhcp6c_changed" in + yes) changed=" (changed)" ;; + no) changed=" (no change)" ;; + *) changed="" ;; + esac + logger -t dhcp6c -p kern.info "IPv6 Prefix$changed: $dhcp6c_prefix" + + if [ "$dhcp6c_changed" != "no" ]; then + if [ -f /var/tmp/aif-net-prefix-translation-global-ipv6 ]; then + arno-iptables-firewall status-plugins net-prefix-translation >/dev/null 2>&1 + fi + fi +fi + if [ -x $SCRIPTFILE ]; then export dhcp6c_interface dhcp6c_address dhcp6c_changed export dhcp6c_prefix_interfaces dhcp6c_prefix_addresses @@ -138,21 +154,6 @@ export dhcp6c_prefix dhcp6c_prefix_base dhcp6c_prefix_len $SCRIPTFILE >/dev/null 2>&1 & -else - if [ -n "$dhcp6c_prefix" ]; then - case "$dhcp6c_changed" in - yes) changed=" (changed)" ;; - no) changed=" (no change)" ;; - *) changed="" ;; - esac - logger -t dhcp6c -p kern.info "IPv6 Prefix$changed: $dhcp6c_prefix" - - if [ "$dhcp6c_changed" != "no" ]; then - if [ -f /var/tmp/aif-net-prefix-translation-global-ipv6 ]; then - arno-iptables-firewall status-plugins net-prefix-translation >/dev/null 2>&1 & - fi - fi - fi fi exit 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |