PHP Fatal Error on Services > DHCPv6 Server & RA
-
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 -
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/1The 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.diffI'd appreciate if those changes are considered and integrated in pfSense. Thanks!
-
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.
-
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