Bug #72973 [Opn->Csd]: Test ip2long_variation2.phpt fails on AIX

From: Date: Mon, 09 Jan 2017 05:27:28 +0000
Subject: Bug #72973 [Opn->Csd]: Test ip2long_variation2.phpt fails on AIX
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206417@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72973&edit=1 ID: 72973 Updated by: krakjoe@php.net Reported by: matthieu dot sarter dot external at atos dot net Summary: Test ip2long_variation2.phpt fails on AIX -Status: Open +Status: Closed Type: Bug Package: Network related Operating System: AIX PHP Version: 7.0.10 -Assigned To: +Assigned To: krakjoe Block user comment: N Private report: N New Comment: I have updated the test: It's not that we don't care about consistency, but that we do care about BC. It may be sensible to apply your patch to a future version of PHP, but today the break doesn't seem worth it: however unlikely it seems, someone on AIX may be relying on it's current behaviour. Previous Comments: ------------------------------------------------------------------------ [2016-08-30 13:02:14] matthieu dot sarter dot external at atos dot net Description: ------------ AIX's built-in inet_pton function is less strict than Linux's inet_pton function : it accepts IP strings containing excedentary O before one of the fourth integers. To ensure consistent behaviour on the two OS, I suggest to check for excendentary O when using PHP's inet_pton on AIX and return false if they exist. This can easily be done by converting back the integer IP returned by AIX's inet_pton to a string IP and check if it is the same as the initial string. This is implemented in the attached patch (tested with PHP 7.0.3, 7.0.7, 7.0.9 and 7.0.10 on AIX 6.1). If consistency is not a priority, this test should be skipped when running on AIX. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72973&edit=1

« previous php.bugs (#206417) next »