[MDEV-32114] INET6_NTOA incorrect return with single zero Created: 2023-09-06  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1
Fix Version/s: 10.5, 10.6, 10.11, 11.0, 11.1

Type: Bug Priority: Minor
Reporter: Vladimir Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None


 Description   

> select INET6_NTOA(INET6_ATON("2001:db8:0:1:1:1:1:1"));
+------------------------------------------------+
| INET6_NTOA(INET6_ATON("2001:db8:0:1:1:1:1:1")) |
+------------------------------------------------+
| 2001:db8::1:1:1:1:1                            |
+------------------------------------------------+

This is wrong, must be 2001:db8:0:1:1:1:1:1

look RFC:
https://www.ietf.org/rfc/rfc5952.txt

4.2.2. Handling One 16-Bit 0 Field

The symbol "::" MUST NOT be used to shorten just one 16-bit 0 field.
For example, the representation 2001:db8:0:1:1:1:1:1 is correct, but
2001:db8::1:1:1:1:1 is not correct.


Generated at Thu Feb 08 10:28:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.