php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75856 IPv6 ::/128 is not recognized by INET_PTON() and INET_NTOP()
Submitted: 2018-01-21 20:43 UTC Modified: 2018-01-22 07:50 UTC
From: alimadadi at outlook dot com Assigned:
Status: Not a bug Package: *Network Functions
PHP Version: Irrelevant OS: macOS, maybe all
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
49 - 47 = ?
Subscribe to this entry?

 
 [2018-01-21 20:43 UTC] alimadadi at outlook dot com
Description:
------------
::/128 is a valid IPv6 address but is not recognized by INET_PTON() and INET_NTOP()

Test script:
---------------
<?php

var_dump(inet_ntop(inet_pton('::/128')));

Expected result:
----------------
IPv6 address ::/128 should be recognized by INET_PTON() and INET_NTOP()

Actual result:
--------------
ERROR:
inet_pton(): Unrecognized address ::/128

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-01-22 07:50 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2018-01-22 07:50 UTC] requinix@php.net
That is not an IP address. That is an IP address range in CIDR format.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 10:01:24 2019 UTC