mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Make sure interface selection works
This commit is contained in:
parent
3b7df5f15b
commit
44cf13822d
@ -43,8 +43,8 @@ require_once("unbound.inc");
|
||||
|
||||
$pconfig['enable'] = isset($config['unbound']['enable']);
|
||||
$pconfig['port'] = $config['unbound']['port'];
|
||||
$pconfig['active_interface'] = $config['unbound']['active_interface'];
|
||||
$pconfig['outgoing_interface'] = $config['unbound']['outgoing_interface'];
|
||||
$pconfig['active_interface'] = explode(",", $config['unbound']['active_interface']);
|
||||
$pconfig['outgoing_interface'] = explode(",", $config['unbound']['outgoing_interface']);
|
||||
$pconfig['dnssec'] = isset($config['unbound']['dnssec']);
|
||||
$pconfig['forwarding'] = isset($config['unbound']['forwarding']);
|
||||
$pconfig['regdhcp'] = isset($config['unbound']['regdhcp']);
|
||||
@ -186,10 +186,11 @@ function show_advanced_dns() {
|
||||
<?=gettext("Interface IPs used by the DNS Resolver for responding to queries from clients. If an interface has both IPv4 and IPv6 IPs, both are used. Queries to other interface IPs not selected below are discarded. The default behavior is to respond to queries on every available IPv4 and IPv6 address.");?>
|
||||
<br /><br />
|
||||
<select id="active_interface" name="active_interface[]" multiple="true" size="3">
|
||||
<option value="" <?php if (empty($pconfig['interface'])) echo 'selected="selected"'; ?>>All</option>
|
||||
<?php foreach ($interface_addresses as $laddr):
|
||||
<option value="" <?php if (empty($pconfig['active_interface'])) echo 'selected="selected"'; ?>>All</option>
|
||||
<?php
|
||||
foreach ($interface_addresses as $laddr):
|
||||
$selected = "";
|
||||
if (in_array($laddr['value'], $pconfig['interface']))
|
||||
if (in_array($laddr['value'], $pconfig['active_interface']))
|
||||
$selected = 'selected="selected"';
|
||||
?>
|
||||
<option value="<?=$laddr['value'];?>" <?=$selected;?>>
|
||||
@ -210,10 +211,11 @@ function show_advanced_dns() {
|
||||
<?=gettext("Utilize different network interface(s) that the DNS Resolver will use to send queries to authoritative servers and receive their replies. By default all interfaces are used.");?>
|
||||
<br /><br />
|
||||
<select id="outgoing_interface" name="outgoing_interface[]" multiple="true" size="3">
|
||||
<option value="" <?php if (empty($pconfig['interface'])) echo 'selected="selected"'; ?>>All</option>
|
||||
<?php foreach ($interface_addresses as $laddr):
|
||||
<option value="" <?php if (empty($pconfig['outgoing_interface'])) echo 'selected="selected"'; ?>>All</option>
|
||||
<?php
|
||||
foreach ($interface_addresses as $laddr):
|
||||
$selected = "";
|
||||
if (in_array($laddr['value'], $pconfig['interface']))
|
||||
if (in_array($laddr['value'], $pconfig['outgoing_interface']))
|
||||
$selected = 'selected="selected"';
|
||||
?>
|
||||
<option value="<?=$laddr['value'];?>" <?=$selected;?>>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user