Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    URGENT: latest Unbound Update 1.4.20_6 crashes on 2.0.x

    Scheduled Pinned Locked Moved pfSense Packages
    4 Posts 2 Posters 1.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Reiner030
      last edited by

      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 / allow

      FIX:

      --- /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

      1 Reply Last reply Reply Quote 0
      • W
        wagonza
        last edited by

        $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.

        Follow me on twitter http://twitter.com/wagonza
        http://www.thepackethub.co.za

        1 Reply Last reply Reply Quote 0
        • R
          Reiner030
          last edited by

          @wagonza:

          $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 ) ;)

          1 Reply Last reply Reply Quote 0
          • W
            wagonza
            last edited by

            I just pushed some changes which should fix the empty element and your multiple core problem. Thanks for your input.

            Follow me on twitter http://twitter.com/wagonza
            http://www.thepackethub.co.za

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.