From 363a5c4c72c898b7ec5386c1ce95a69ec523b7b4 Mon Sep 17 00:00:00 2001 From: Luiz Souza Date: Fri, 11 Aug 2017 23:21:35 -0500 Subject: Do not run the dpinger when the IPv6 address has the tentative flag even after the timeout. --- src/etc/inc/gwlb.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/etc') diff --git a/src/etc/inc/gwlb.inc b/src/etc/inc/gwlb.inc index 83c2592..97347ad 100644 --- a/src/etc/inc/gwlb.inc +++ b/src/etc/inc/gwlb.inc @@ -92,7 +92,7 @@ function start_dpinger($gateway) { global $g; if (!isset($gateway['gwifip'])) { - return; + return (false); } $dpinger_defaults = return_dpinger_defaults(); @@ -166,8 +166,12 @@ function start_dpinger($gateway) { /* Do not try to bind IPv6 where interface is in tentative state */ if (is_ipaddrv6($gateway['gwifip'])) { - interface_wait_tentative(get_real_interface( + $err = interface_wait_tentative(get_real_interface( $gateway['interface'])); + if ($err == false) { + log_error(gettext("Timeout waiting for IPv6 address in tentative state. dpinger will not run.")); + return (false); + } } /* Redirect stdout to /dev/null to avoid exec() to wait for dpinger */ -- cgit v1.1