diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 4 | ||||
-rw-r--r-- | etc/inc/services.inc | 43 |
2 files changed, 10 insertions, 37 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index d140566..d41aad7 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1755,10 +1755,10 @@ function interface_configure($interface = "wan", $reloadall = false) { vpn_ipsec_configure(); /* update dyndns */ - services_dyndns_configure(); + services_dyndns_configure($interface); /* force DNS update */ - services_dnsupdate_process(); + services_dnsupdate_process($interface); /* restart dnsmasq */ services_dnsmasq_configure(); diff --git a/etc/inc/services.inc b/etc/inc/services.inc index e896f81..4c519a6 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -537,32 +537,6 @@ function services_dhcrelay_configure() { return 0; } -function services_dyndns_reset($interface = "wan" ) { - global $config, $g; - if(isset($config['system']['developerspew'])) { - $mt = microtime(); - echo "services_dyndns_reset() being called $mt\n"; - } - - $dyndnscfg = $config['dyndnses']['dyndns']; - - if (is_array($dyndnscfg)) { - foreach ($dyndnscfg as $dyndns) { - if (!isset($dyndns['enable'])) - continue; - if ($dyndns['interface'] != $interface) - continue; - - services_dyndns_configure_client($dyndns); - - sleep(1); - } - - } - - return 0; -} - function services_dyndns_configure_client($conf) { /* load up the dyndns.class */ @@ -849,7 +823,7 @@ EOD; return 0; } -function services_dnsupdate_process() { +function services_dnsupdate_process($int = "") { global $config, $g; if(isset($config['system']['developerspew'])) { $mt = microtime(); @@ -859,15 +833,14 @@ function services_dnsupdate_process() { /* Dynamic DNS updating active? */ if (is_array($config['dnsupdates']['dnsupdate'])) { foreach ($config['dnsupdates']['dnsupdate'] as $i => $dnsupdate) { - if (!isset($dyndns['enable'])) + if (!isset($dyndns['enable'])) + continue; + if (!empty($int) && $int != $dyndns['interface']) continue; - /* determine interface name */ - if ($dyndns['interface'] == "wan") - $if = get_real_interface(); - else - $if = convert_friendly_interface_to_real_interface_name($dyndns['interface']); - $wanip = get_interface_ip($if); + /* determine interface name */ + $if = get_real_interface($dyndns['interface']); + $wanip = get_interface_ip($dyndns['interface']); if ($wanip) { $keyname = $dnsupdate['keyname']; @@ -1300,4 +1273,4 @@ function upnp_start() { } } -?>
\ No newline at end of file +?> |