Bug #11117
closedNet/ipv6.php: str_repeat(): Second argument has to be greater than or equal to 0 in /usr/local/share/pear/Net/IPv6.php on line 614
0%
Description
PHP Warning: str_repeat(): Second argument has to be greater than or equal to 0 in /usr/local/share/pear/Net/IPv6.php on line 614
This repeats infinitely in my log file, when looking at the PHP file I don't know enough about programming to fix the second argument on line 614, top line below, and included 615, 616 & 617:
$fill = str_repeat(':0:', 6-$c2-$c1);
$uip = str_replace('::', $fill, $uip);
$uip = str_replace('::', ':', $uip);
I have included the crash report as well as the original file in question, and a .save variant I discovered today in same directory. Thanks all
Files
Updated by Andrew Appel almost 5 years ago
Correction: included lines 614-616 (not 617), but PHP file in question is of course attached. Requested to submit here from subreddit by developer of pfBlocker-NG.
Updated by Jim Pingle almost 5 years ago
- Status changed from New to Feedback
The code itself is likely fine in the base OS (unless you edited it before the error appeared) but whatever it's being fed is wrong somehow. Check the IPv6 addresses and prefixes in your configuration and make sure they are all valid/sane. Perhaps something slipped past validation.
That nobody else is hitting it would imply it's specific to your environment somehow.
Updated by Andrew Appel almost 5 years ago
Jim Pingle wrote:
The code itself is likely fine in the base OS (unless you edited it before the error appeared) but whatever it's being fed is wrong somehow. Check the IPv6 addresses and prefixes in your configuration and make sure they are all valid/sane. Perhaps something slipped past validation.
That nobody else is hitting it would imply it's specific to your environment somehow.
AH. My issue was I was forcing WAN to ignore DHCP from my ISP to use my own DNS choice (only for router, not used in Unbound) - this disallowed DHCPv6 on WAN from getting any IPv6 DNS entries for the router. As I had only used 2 IPv4 entries and unchecked "Allow DCHP override" for WAN. Thank you for your assistance, and apologies that this was a non-issue, this can be closed / deleted / archived or however it may (or may not) be useful to anyone.
Updated by Jim Pingle almost 5 years ago
- Status changed from Feedback to Not a Bug