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

    PHP Fatal Error on Services > DHCPv6 Server & RA

    Scheduled Pinned Locked Moved 2.4 Development Snapshots
    4 Posts 3 Posters 2.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.
    • J
      JorgeOliveira
      last edited by

      PHP Errors:
      [30-Aug-2016 15:31:30 Etc/UTC] PHP Fatal error:  Call to protected method Net_IPv6::_ip2Bin() from context '' in /etc/inc/util.inc on line 374
      [30-Aug-2016 15:31:30 Etc/UTC] PHP Stack trace:
      [30-Aug-2016 15:31:30 Etc/UTC] PHP   1\. {main}() /usr/local/www/services_dhcpv6.php:0
      [30-Aug-2016 15:31:30 Etc/UTC] PHP   2\. gen_subnetv6_max() /usr/local/www/services_dhcpv6.php:593
      

      The copy of PEAR Net_IPv6 that version 2.4 ships is more "outdated" than the version previously shipped as IPv6.inc on 2.3. Upstream lacks custom code implemented to fix bugs reported on pfSense such as missing validations, and more recently some methods have been changed to be 'protected', this causes pfSense's functions not being able to properly access them, leading to PHP errors.

      The attached patch is a band-aid for this problem and imports all 2.3 customizations to the version currently shipped on 2.4.

      Edit: The attached patch is now old. It is missing whitespace edits and one logic fix that has made into the newer diff.
      IPv6.txt

      My views have absolutely no warranty express or implied. Always do your own research.

      1 Reply Last reply Reply Quote 0
      • J
        JorgeOliveira
        last edited by

        I've noticed phil-davis has been working on this, so I've submitted a PR to his working copy:
        https://github.com/phil-davis/Net_IPv6_svn/pull/1

        The URL below contains all changes from original Net_IPv6-1.3.0b2 to latest working copy I've tweaked.
        https://github.com/phil-davis/Net_IPv6_svn/compare/178bef2e592c594398f4c626bb4add5aa1305604…NewEraCracker:master.diff

        I'd appreciate if those changes are considered and integrated in pfSense. Thanks!

        My views have absolutely no warranty express or implied. Always do your own research.

        1 Reply Last reply Reply Quote 0
        • P
          phil.davis
          last edited by

          I have been busy with other non-pfSense life the last few weeks. I was intending to sort out which fixes really were still needed in the IPv6.inc that comes from upstream and then provide those upstream. It needs me to add tests upstream that fail (at first) then work after the fixes… because the upstream code has a test module, which is a good thing.

          I will try to get to it this weekend, maybe.

          As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
          If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

          1 Reply Last reply Reply Quote 0
          • rbgargaR
            rbgarga Developer Netgate Administrator
            last edited by

            to avoid adding more custom patches on ports, in this case pear-Net_IPv6 I've added our own copies of _bin2Ip and _ip2Bin. If upstream accept to make these methods public, and probably rename them, we can revert my commit and rename calls to proper function.

            Thanks!

            https://github.com/pfsense/pfsense/commit/de6457345617a6518e58f3ebafa706948534b11a

            Renato Botelho

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