From 017817c25d8121a386df29d4f73551a73ea16d3a Mon Sep 17 00:00:00 2001 From: smos Date: Thu, 13 Sep 2012 18:49:51 +0200 Subject: Make the gateway group member check a boolean, might convert to something else at a later time so we could check group memberships. Also launch the dyndns configure if the dyndns interface is a gateway group name, could check membership later if we wanted. --- etc/inc/gwlb.inc | 6 +++--- etc/inc/services.inc | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'etc') diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 593d522..20149b4 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -989,9 +989,9 @@ function interface_gateway_group_member($interface) { foreach($group['item'] as $item) { $elements = explode("|", $item); $gwname = $elements[0]; - $gwif = lookup_gateway_interface_by_name($gwname); - if($gwif == $interface) - return $group['name']; + $gwif = get_real_interface(lookup_gateway_interface_by_name($gwname)); + if($gwif == $realif) + return true; } } } diff --git a/etc/inc/services.inc b/etc/inc/services.inc index a0c49b9..6cea972 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -1382,16 +1382,19 @@ function services_dyndns_configure($int = "") { } $dyndnscfg = $config['dyndnses']['dyndns']; - + $gwgroups = return_gateway_groups_array(); if (is_array($dyndnscfg)) { if ($g['booting']) echo gettext("Starting DynDNS clients..."); foreach ($dyndnscfg as $dyndns) { $failovergroup = interface_gateway_group_member($int); - if ((!empty($int) && $int == $dyndns['interface']) || (!empty($failovergroup) && ($failovergroup == $dyndns['interface']))) { + if (!empty($int) && $int == $dyndns['interface']) { services_dyndns_configure_client($dyndns); sleep(1); + } elseif (is_array($gwgroups[$dyndns['interface']])){ + services_dyndns_configure_client($dyndns); + sleep(1); } else { continue; } -- cgit v1.1