From 786ff5ebd9640e70d9fbdaac5ce7c2d87355fa2c Mon Sep 17 00:00:00 2001 From: phildd Date: Wed, 26 Dec 2012 14:37:09 +0545 Subject: Handle null parameter to services_dyndns_configure When service_dyndns_configure is called with a null parameter, it should check/update the dyndns state of all interfaces configured for dyndns. But actually it is only updating gateway groups. e.g. the daily cron job /etc/rc.dyndns.update does not update an ordinary WAN interface. This fixes the problem. --- etc/inc/services.inc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'etc') diff --git a/etc/inc/services.inc b/etc/inc/services.inc index d5c6b3a..4e6a532 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -6,7 +6,7 @@ originally part of m0n0wall (http://m0n0.ch/wall) Copyright (C) 2003-2004 Manuel Kasper . - Copyright (C) 2010 Ermal Lu�i + Copyright (C) 2010 Ermal Luci All rights reserved. Redistribution and use in source and binary forms, with or without @@ -1493,15 +1493,9 @@ function services_dyndns_configure($int = "") { echo gettext("Starting DynDNS clients..."); foreach ($dyndnscfg as $dyndns) { - $failovergroup = interface_gateway_group_member($int); - if (!empty($int) && $int == $dyndns['interface']) { + if ((empty($int)) || ($int == $dyndns['interface']) || (is_array($gwgroups[$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