summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/inc/interfaces.inc3
-rw-r--r--src/etc/inc/services.inc18
-rwxr-xr-xsrc/etc/rc.newwanipv61
3 files changed, 22 insertions, 0 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index 472e087..c47a542 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -3515,6 +3515,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 b17b088..41ec68c 100644
--- a/src/etc/inc/services.inc
+++ b/src/etc/inc/services.inc
@@ -2261,8 +2261,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 f669f5b..f41a91d 100755
--- a/src/etc/rc.newwanipv6
+++ b/src/etc/rc.newwanipv6
@@ -140,6 +140,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;
}
OpenPOWER on IntegriCloud