summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-12-21 17:24:53 +0000
committerErmal Luçi <eri@pfsense.org>2009-12-21 17:25:05 +0000
commit2ec2a374685c2141f4825097057a0496a4d45bc3 (patch)
tree08fa06b4708ede0f201e2c1ad9f8bc1ea5905bae
parent2290a686fa73b64c96d71d2ef8fcea508bc7a44f (diff)
downloadpfsense-2ec2a374685c2141f4825097057a0496a4d45bc3.zip
pfsense-2ec2a374685c2141f4825097057a0496a4d45bc3.tar.gz
Make dnsupdate runnable per interface. Update the calls on interface_configure to per interface. Remove unused dyndns_reset function.
-rw-r--r--etc/inc/interfaces.inc4
-rw-r--r--etc/inc/services.inc43
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
+?>
OpenPOWER on IntegriCloud