URGENT: latest Unbound Update 1.4.20_6 crashes on 2.0.x
-
Hi,
thanks for inserting IPv6 support to unbound 1.4.20_6.
BUT… it adds IPv6 ACLs even on pfSense 2.0.x ... That gaves "nice" errors:
[2.0.3-RELEASE][root@fw2.jws1.local]/root(devil): /usr/local/sbin/unbound-checkconf
[1370787207] unbound-checkconf[56007:0] error: cannot parse netblock: '/'
[1370787207] unbound-checkconf[56007:0] fatal error: cannot parse access control address / allowFIX:
--- /usr/local/pkg/unbound.inc.origorig 2013-06-08 22:31:34.000000000 +0200 +++ /usr/local/pkg/unbound.inc 2013-06-09 16:25:05.000000000 +0200 @@ -411,7 +411,7 @@ foreach($unboundnetcfg as $netent) { foreach($netent as $entry) { $unbound_bind_interfaces .="interface: {$entry['ipaddr']}\n"; - if($entry['ipaddr'] != "127.0.0.1" && $entry['ipaddr'] != "::1") + if($entry['ipaddr'] != "127.0.0.1" && $entry['ipaddr'] != "::1" && $entry['network'] != "") $unbound_allowed_networks .= "access-control: {$entry['network']}/{$entry['subnet']} allow\n"; } }
btw… don't forget to mentioned that the 6core fix is still buggy... so here the 2nd patch to fix it:
--- /usr/local/pkg/unbound.inc.orig 2013-02-19 23:09:11.000000000 +0100 +++ /usr/local/pkg/unbound.inc 2013-02-26 22:50:05.000000000 +0100 @@ -620,15 +620,8 @@ // Slabs to help reduce lock contention. - if ($numprocs > 4) { - $optimization['msg_cache_slabs'] = "msg-cache-slabs: {$numprocs}"; - $optimization['rrset_cache_slabs'] = "rrset-cache-slabs: {$numprocs}"; - $optimization['infra_cache_slabs'] = "infra-cache-slabs: {$numprocs}"; - $optimization['key_cache_slabs'] = "key-cache-slabs: {$numprocs}"; - } else { - $optimization['msg_cache_slabs'] = "msg-cache-slabs: 4"; - $optimization['rrset_cache_slabs'] = "rrset-cache-slabs: 4"; - $optimization['infra_cache_slabs'] = "infra-cache-slabs: 4"; - $optimization['key_cache_slabs'] = "key-cache-slabs: 4"; - } + $optimization['msg_cache_slabs'] = "msg-cache-slabs: " . pow(2,floor(log($numprocs,2))); + $optimization['rrset_cache_slabs'] = "rrset-cache-slabs: " . pow(2,floor(log($numprocs,2))); + $optimization['infra_cache_slabs'] = "infra-cache-slabs: " . pow(2,floor(log($numprocs,2))); + $optimization['key_cache_slabs'] = "key-cache-slabs: " . pow(2,floor(log($numprocs,2))); // Memory usage - default is 4Mb if nothing has been selected
Bests
Reiner
-
$entry['network'] should never have an empty element, so although your fix will address that I will need to check why there is an empty element in the first place.
Will also checkout the $numprocs fix. -
$entry['network'] should never have an empty element, so although your fix will address that I will need to check why there is an empty element in the first place.
Will also checkout the $numprocs fix.ok, thx… I referenced $entry['network'] as empty because $entry['ipaddr'] != "" wasn't working.
You can use your actual >4core if-then-else, too…
But the > condition must be < then (i found it only more useful to calculate minimum 2^n solution for 8core CPUs in future ) ;) -
I just pushed some changes which should fix the empty element and your multiple core problem. Thanks for your input.