Just in case anyone is interested, here are my hacks to /lib/netifd/proto/dhcpv6.sh
A bit crude, so open to suggestions.
--- /rom/lib/netifd/proto/dhcpv6.sh 2017-10-17 17:46:20.000000000 +0000
+++ /lib/netifd/proto/dhcpv6.sh 2018-03-26 09:39:52.000000000 +0000
@@ -37,9 +37,17 @@
local config="$1"
local iface="$2"
+ # debug to log file
+ logger "DHCPV6-DEBUG proto_dhcpv6_setup config=$1"
+ logger "DHCPV6-DEBUG proto_dhcpv6_setup iface=$2"
+
local reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime
json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime
+ # debug to log file
+ logger "DHCPV6-DEBUG proto_dhcpv6_setup reqaddress=$reqaddress"
+ logger "DHCPV6-DEBUG proto_dhcpv6_setup reqprefix=$reqprefix"
+
# Configure
local opts=""
@@ -84,6 +92,11 @@
[ "$sourcefilter" = "0" ] && proto_export "NOSOURCEFILTER=1"
[ "$extendprefix" = "1" ] && proto_export "EXTENDPREFIX=1"
+ logger "DHCPV6-DEBUG proto_dhcpv6_setup OVERRIDE opts"
+ logger "DHCPV6-DEBUG proto_dhcpv6_setup was opts=$opts"
+ opts="-v -Nnone"
+ logger "DHCPV6-DEBUG proto_dhcpv6_setup now opts=$opts"
+
proto_export "INTERFACE=$config"
proto_run_command "$config" odhcp6c \
-s /lib/netifd/dhcpv6.script \
@@ -92,6 +105,7 @@
proto_dhcpv6_renew() {
local interface="$1"
+ logger "DHCPV6-DEBUG proto_dhcpv6_renew interface=$1"
# SIGUSR1 forces odhcp6c to renew its lease
local sigusr1="$(kill -l SIGUSR1)"
[ -n "$sigusr1" ] && proto_kill_command "$interface" $sigusr1
@@ -99,6 +113,7 @@
proto_dhcpv6_teardown() {
local interface="$1"
+ logger "DHCPV6-DEBUG proto_dhcpv6_teardown interface=$1"
proto_kill_command "$interface"
}
and some filtered output after ifup wan
logread | grep -i dhcp | grep -v dnsmasq Mon Mar 26 06:17:24 2018 daemon.info odhcpd[861]: Raising SIGUSR1 due to default route change Mon Mar 26 06:17:24 2018 daemon.info odhcpd[861]: Raising SIGUSR1 due to address change on br-lan Mon Mar 26 06:17:24 2018 daemon.info odhcpd[861]: Raising SIGUSR1 due to address change on pppoe-wan Mon Mar 26 06:17:24 2018 user.notice root: DHCPV6-DEBUG proto_dhcpv6_teardown interface=wan_6 Mon Mar 26 06:17:24 2018 daemon.info odhcpd[861]: Raising SIGUSR1 due to address change on pppoe-wan Mon Mar 26 06:17:25 2018 daemon.info odhcpd[861]: Using a RA lifetime of 1800 seconds on br-lan Mon Mar 26 06:17:40 2018 daemon.info odhcpd[861]: Raising SIGUSR1 due to default route change Mon Mar 26 06:17:40 2018 user.notice root: DHCPV6-DEBUG proto_dhcpv6_setup config=wan_6 Mon Mar 26 06:17:40 2018 user.notice root: DHCPV6-DEBUG proto_dhcpv6_setup iface=pppoe-wan Mon Mar 26 06:17:40 2018 user.notice root: DHCPV6-DEBUG proto_dhcpv6_setup reqaddress= Mon Mar 26 06:17:40 2018 user.notice root: DHCPV6-DEBUG proto_dhcpv6_setup reqprefix= Mon Mar 26 06:17:40 2018 user.notice root: DHCPV6-DEBUG proto_dhcpv6_setup OVERRIDE opts Mon Mar 26 06:17:40 2018 user.notice root: DHCPV6-DEBUG proto_dhcpv6_setup was opts=-P0 -t120 Mon Mar 26 06:17:40 2018 user.notice root: DHCPV6-DEBUG proto_dhcpv6_setup now opts=-v -Nnone Mon Mar 26 06:17:40 2018 daemon.notice odhcp6c[29284]: (re)starting transaction on pppoe-wan Mon Mar 26 06:17:40 2018 daemon.notice odhcp6c[29284]: Starting INFOREQ transaction (timeout 4294967295s, max rc 0) Mon Mar 26 06:17:40 2018 daemon.notice odhcp6c[29284]: Got a valid reply after 9ms Mon Mar 26 06:17:40 2018 daemon.notice odhcp6c[29284]: entering stateless-mode on pppoe-wan Mon Mar 26 06:17:40 2018 daemon.notice odhcp6c[29284]: Starting transaction (timeout 86400s, max rc 0) Mon Mar 26 06:17:41 2018 daemon.info odhcpd[861]: Using a RA lifetime of 1800 seconds on br-lan Mon Mar 26 06:25:18 2018 daemon.notice odhcpd[861]: Got DHCPv6 request