Bug#1067760: libc6: Curious behavior of inet_pton() on IPv4 mapped numbers
Hi, Thanks for your bug report. On 2024-03-26 12:53, Alessandro Vesely wrote: > Package: libc6 > Version: 2.36-9+deb12u4 > Severity: normal > Tags: ipv6 > > Dear Maintainer, > > I compiled the example program given in the inet_pton(3) man page, and obtain > the following: > > $ ./a.out i6 0:0:0::5:6:7:8 > :::5:6:7:8 > $ ./a.out i6 0:0:0::5.6.7.8 > Not in presentation format > $ ./a.out i6 0:0:0:0:0::5.6.7.8 > :::5.6.7.8 Could you please tell me what do you find curious and what do you expect instead? Thanks. Regards Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://aurel32.net
Bug#1067760: libc6: Curious behavior of inet_pton() on IPv4 mapped numbers
On Tue 26/Mar/2024 17:34:20 +0100 Bastian Blank wrote: On Tue, Mar 26, 2024 at 12:53:42PM +0100, Alessandro Vesely wrote: I compiled the example program given in the inet_pton(3) man page, and obtain the following: $ ./a.out i6 0:0:0::5.6.7.8 Not in presentation format This is no valid IPv6 address. Oops, you're right. Sorry for the confusion. Where did you find that? We were discussing a regex to catch all (valid) IP addresses when someone noted that leading zeroes are valid, albeit not the RFC 5952 recommended format. It's overly tricky for me. Best Ale
Bug#1067760: libc6: Curious behavior of inet_pton() on IPv4 mapped numbers
On Tue, Mar 26, 2024 at 12:53:42PM +0100, Alessandro Vesely wrote: > I compiled the example program given in the inet_pton(3) man page, and obtain > the following: > $ ./a.out i6 0:0:0::5.6.7.8 > Not in presentation format This is no valid IPv6 address. Where did you find that? Bastian -- "Get back to your stations!" "We're beaming down to the planet, sir." -- Kirk and Mr. Leslie, "This Side of Paradise", stardate 3417.3
Bug#1067760: libc6: Curious behavior of inet_pton() on IPv4 mapped numbers
Package: libc6 Version: 2.36-9+deb12u4 Severity: normal Tags: ipv6 Dear Maintainer, I compiled the example program given in the inet_pton(3) man page, and obtain the following: $ ./a.out i6 0:0:0::5:6:7:8 :::5:6:7:8 $ ./a.out i6 0:0:0::5.6.7.8 Not in presentation format $ ./a.out i6 0:0:0:0:0::5.6.7.8 :::5.6.7.8 Best Ale -- System Information: Debian Release: 12.0 merged-usr: no Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.1.0-18-amd64 (SMP w/8 CPU threads; PREEMPT) Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/bash Init: sysvinit (via /sbin/init) Versions of packages libc6 depends on: ii libgcc-s1 12.2.0-14 Versions of packages libc6 recommends: ii libidn2-0 2.3.3-1+b1 Versions of packages libc6 suggests: ii debconf [debconf-2.0] 1.5.82 ii glibc-doc 2.36-9+deb12u4 ii libc-l10n 2.36-9+deb12u4 ii libnss-nis 3.1-4 ii libnss-nisplus 1.3-4 ii locales2.36-9+deb12u4 -- debconf information excluded