mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Revert "dns/dyndns: sync with master"
This reverts commit 7f241410838f17a41f4362efa25defa5390b187d.
This commit is contained in:
@@ -182,6 +182,7 @@ function dyndns_configure_do($verbose = false, $int = '')
|
||||
}
|
||||
|
||||
$dyndnscfg = $config['dyndnses']['dyndns'];
|
||||
$gwgroups = return_gateway_groups_array();
|
||||
|
||||
if ($verbose) {
|
||||
echo 'Configuring dynamic DNS clients...';
|
||||
@@ -189,7 +190,7 @@ function dyndns_configure_do($verbose = false, $int = '')
|
||||
}
|
||||
|
||||
foreach ($dyndnscfg as $dyndns) {
|
||||
if (empty($int) || $int == $dyndns['interface']) {
|
||||
if ((empty($int)) || ($int == $dyndns['interface']) || (is_array($gwgroups[$dyndns['interface']]))) {
|
||||
$dyndns['verboselog'] = isset($dyndns['verboselog']);
|
||||
$dyndns['curl_ipresolve_v4'] = isset($dyndns['curl_ipresolve_v4']);
|
||||
$dyndns['curl_ssl_verifypeer'] = isset($dyndns['curl_ssl_verifypeer']);
|
||||
|
||||
@@ -259,13 +259,13 @@ class updatedns
|
||||
$this->_dnsMX = $dnsMX;
|
||||
$this->_dnsZoneID = $dnsZoneID;
|
||||
$this->_dnsTTL = $dnsTTL;
|
||||
$this->_if = get_real_interface($dnsIf, $this->_useIPv6 ? 'inet6' : 'all');
|
||||
$this->_if = get_failover_interface($dnsIf, $this->_useIPv6 ? 'inet6' : 'all');
|
||||
$this->_checkIP();
|
||||
$this->_dnsUpdateURL = $dnsUpdateURL;
|
||||
$this->_dnsResultMatch = $dnsResultMatch;
|
||||
$this->_dnsRequestIf = get_real_interface($dnsRequestIf, $this->_useIPv6 ? 'inet6' : 'all');
|
||||
$this->_dnsRequestIf = get_failover_interface($dnsRequestIf, $this->_useIPv6 ? 'inet6' : 'all');
|
||||
if ($this->_dnsVerboseLog) {
|
||||
log_error("Dynamic DNS ({$this->_dnsHost}): running get_real_interface for {$dnsRequestIf}. found {$this->_dnsRequestIf}");
|
||||
log_error("Dynamic DNS ({$this->_dnsHost}): running get_failover_interface for {$dnsRequestIf}. found {$this->_dnsRequestIf}");
|
||||
}
|
||||
$this->_dnsRequestIfIP = get_interface_ip($dnsRequestIf);
|
||||
$this->_dnsMaxCacheAgeDays = 25;
|
||||
|
||||
@@ -2,30 +2,30 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Scott Ullrich <sullrich@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
||||
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
Copyright (C) 2004 Scott Ullrich <sullrich@gmail.com>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
||||
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
require_once("config.inc");
|
||||
require_once("interfaces.inc");
|
||||
|
||||
@@ -247,6 +247,7 @@ include("head.inc");
|
||||
<select name="interface" class="selectpicker" id="interface">
|
||||
<?php
|
||||
$iflist = get_configured_interface_with_descr();
|
||||
$iflist = array_merge($iflist, return_gateway_groups_array());
|
||||
foreach ($iflist as $if => $ifdesc):?>
|
||||
<option value="<?= $if ?>" <?=$pconfig['interface'] == $if ? 'selected="selected"' : '';?>>
|
||||
<?= is_array($ifdesc) ? $if : htmlspecialchars($ifdesc) ?>
|
||||
@@ -263,6 +264,7 @@ include("head.inc");
|
||||
<select name="requestif" class="selectpicker" id="requestif">
|
||||
<?php
|
||||
$iflist = get_configured_interface_with_descr();
|
||||
$iflist = array_merge($iflist, return_gateway_groups_array());
|
||||
foreach ($iflist as $if => $ifdesc):?>
|
||||
<option value="<?= $if ?>" <?= $pconfig['requestif'] == $if ? 'selected="selected"' : '' ?>>
|
||||
<?= is_array($ifdesc) ? $if : htmlspecialchars($ifdesc) ?>
|
||||
|
||||
@@ -98,6 +98,7 @@ if (!empty($_REQUEST['getdyndnsstatus'])) {
|
||||
<?php
|
||||
$iflist = get_configured_interface_with_descr();
|
||||
$types = dyndns_list();
|
||||
$groupslist = return_gateway_groups_array();
|
||||
foreach ($a_dyndns as $i => $dyndns) :?>
|
||||
<tr ondblclick="document.location='services_dyndns_edit.php?id=<?=$i;?>'">
|
||||
<td style="word-break:break-word;" <?= isset($dyndns['enable']) ? '' : 'class="text-muted"' ?>>
|
||||
@@ -107,6 +108,12 @@ if (!empty($_REQUEST['getdyndnsstatus'])) {
|
||||
echo "{$ifdesc}";
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach ($groupslist as $if => $group) {
|
||||
if ($dyndns['interface'] == $if) {
|
||||
echo "{$if}";
|
||||
break;
|
||||
}
|
||||
}?>
|
||||
</td>
|
||||
<td style="word-break:break-word;" <?= isset($dyndns['enable']) ? '' : 'class="text-muted"' ?>>
|
||||
|
||||
Reference in New Issue
Block a user