mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
(legacy) unbound renders some illegal output for empty ipv6, closes https://github.com/opnsense/core/issues/738
This commit is contained in:
parent
555fda69a2
commit
ebd02c22cf
@ -162,11 +162,11 @@ EOF;
|
||||
$active_interfaces = explode(",", $config['unbound']['active_interface']);
|
||||
foreach($active_interfaces as $ubif) {
|
||||
$intip = get_interface_ip($ubif);
|
||||
if (!is_null($intip)) {
|
||||
if (!empty($intip)) {
|
||||
$bindints .= "interface: $intip\n";
|
||||
}
|
||||
$intip = get_interface_ipv6($ubif);
|
||||
if (!is_null($intip)) {
|
||||
if (!empty($intip)) {
|
||||
$bindints .= "interface: $intip\n";
|
||||
}
|
||||
}
|
||||
@ -182,11 +182,11 @@ EOF;
|
||||
$outgoing_interfaces = explode(",", $config['unbound']['outgoing_interface']);
|
||||
foreach($outgoing_interfaces as $outif) {
|
||||
$outip = get_interface_ip($outif);
|
||||
if (!is_null($outip)) {
|
||||
if (!empty($outip)) {
|
||||
$outgoingints .= "outgoing-interface: $outip\n";
|
||||
}
|
||||
$outip = get_interface_ipv6($outif);
|
||||
if (!is_null($outip)) {
|
||||
if (!empty($outip)) {
|
||||
$outgoingints .= "outgoing-interface: $outip\n";
|
||||
}
|
||||
}
|
||||
@ -687,13 +687,13 @@ function unbound_acls_config() {
|
||||
$bindints = "";
|
||||
foreach($active_interfaces as $ubif => $ifdesc) {
|
||||
$ifip = get_interface_ip($ubif);
|
||||
if (!is_null($ifip)) {
|
||||
if (!empty($ifip)) {
|
||||
$subnet_bits = get_interface_subnet($ubif);
|
||||
$subnet_ip = gen_subnet($ifip, $subnet_bits);
|
||||
$aclcfg .= "access-control: {$subnet_ip}/{$subnet_bits} allow\n";
|
||||
}
|
||||
$ifip = get_interface_ipv6($ubif);
|
||||
if (!is_null($ifip)) {
|
||||
if (!empty($ifip)) {
|
||||
$subnet_bits = get_interface_subnetv6($ubif);
|
||||
$subnet_ip = gen_subnetv6($ifip, $subnet_bits);
|
||||
$aclcfg .= "access-control: {$subnet_ip}/{$subnet_bits} allow\n";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user