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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alimadadi at outlook dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 17:01:28 2025 UTC