diff options
-rw-r--r-- | src/etc/inc/interfaces.inc | 3 | ||||
-rw-r--r-- | src/etc/inc/services.inc | 18 | ||||
-rwxr-xr-x | src/etc/rc.newwanipv6 | 1 |
3 files changed, 22 insertions, 0 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 5de6020..4601446 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -3449,6 +3449,9 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven // N.B. PPP connections using PPP as the IPv6 parent interface are excluded because the ppp-ipv6 script // calls interface_dhcpv6_configure() for these connections after IPv6CP is up, whilst rc.newwanip // handles all non-PPP connections with 'dhcp6usev4iface' set + /* Remove the check file. Should not be there but just in case */ + unlink_if_exists("/tmp/{$wanif}_dhcp6_complete"); + log_error(gettext("calling interface_dhcpv6_configure.")); if (!(isset($wancfg['dhcp6usev4iface']) || $wancfg['ipaddr']==='ppp')) { interface_dhcpv6_configure($interface, $wancfg); } diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc index 65aaf5c..38d4230 100644 --- a/src/etc/inc/services.inc +++ b/src/etc/inc/services.inc @@ -2315,8 +2315,26 @@ function services_unbound_configure($restart_dhcp = true) { $return = 1; } + /* Check here for dhcp6 complete - wait upto 10 seconds */ + if($config['interfaces']["wan"]['ipaddrv6'] == 'dhcp6') { + $wanif = get_real_interface("wan", "inet6"); + if (platform_booting()) { + for ($i=1; $i <= 10; $i++) { + if (!file_exists("/tmp/{$wanif}_dhcp6_complete")) { + log_error(gettext("Unbound start waiting on dhcp6c.")); + sleep(1); + } else { + unlink_if_exists("/tmp/{$wanif}_dhcp6_complete"); + log_error(gettext("dhcp6 init complete. Continuing")); + break; + } + } + } + } + sync_unbound_service(); if (platform_booting()) { + log_error(gettext("sync unbound done.")); echo gettext("done.") . "\n"; } diff --git a/src/etc/rc.newwanipv6 b/src/etc/rc.newwanipv6 index ed8abf0..c4fa367 100755 --- a/src/etc/rc.newwanipv6 +++ b/src/etc/rc.newwanipv6 @@ -172,6 +172,7 @@ setup_gateways_monitor(); if (platform_booting()) { // avoid race conditions in many of the below functions that occur during boot + touch("/tmp/{$interface_real}_dhcp6_complete"); exit; } |