| Summary: |
inet_pton fails to deal with IPv6 address with format like 0:0:1:0:0:0:ffff:0a001 |
| Product: |
[Fedora] Fedora
|
Reporter: |
Jianwen Ji <jiji> |
| Component: |
glibc | Assignee: |
Carlos O'Donell <codonell> |
| Status: |
CLOSED
NOTABUG
|
QA Contact: |
Fedora Extras Quality Assurance <extras-qa> |
| Severity: |
medium
|
Docs Contact: |
|
| Priority: |
medium
|
|
|
| Version: |
27 | CC: |
aoliva, arjun, codonell, dj, fweimer, law, lnie, mfabian, pfrankli, rth, siddhesh
|
| Target Milestone: |
--- | |
|
| Target Release: |
--- | |
|
| Hardware: |
All | |
|
| OS: |
Linux | |
|
| Whiteboard: |
|
|
Fixed In Version:
|
|
Doc Type:
|
If docs needed, set a value
|
|
Doc Text:
|
|
Story Points:
|
---
|
|
Clone Of:
|
|
Environment:
|
|
|
Last Closed:
|
2017-12-04 07:14:06 UTC
|
Type:
|
Bug
|
|
Regression:
|
---
|
Mount Type:
|
---
|
|
Documentation:
|
---
|
CRM:
|
|
|
Verified Versions:
|
|
Category:
|
---
|
|
oVirt Team:
|
---
|
RHEL 7.3 requirements from Atomic Host:
|
|
|
Cloudforms Team:
|
---
|
Target Upstream Version:
|
|
|
Embargoed:
|
|
| |
Description of problem: When running IPv6 related tests on Fedora, inet_pton failed to deal with IPv6 address with format like 0:0:1:0:0:0:ffff:0a001 The source code: $ cat test.c #include <stdio.h> #include <unistd.h> #include <errno.h> #include <netinet/in.h> #include <arpa/inet.h> struct { char *addr; int ismap; } maptab[] = { {"2002::1", 0 }, {"::ffff:10.0.0.1", 1 }, {"::fffe:10.0.0.1", 0 }, {"::7fff:10.0.0.1", 0 }, {"0:0:0:0:0:0:ffff:0a001", 1 }, }; #define MAPSIZE (sizeof(maptab)/sizeof(maptab[0])) int main(int argc, char **argv) { struct in6_addr in6; int i; for (i=0; i<MAPSIZE; ++i) { if (inet_pton(AF_INET6, maptab[i].addr, &in6) <= 0) { fprintf(stderr, "\"%s\" is not a valid IPv6 address\n", maptab[i].addr); continue; } } return 0; } Version-Release number of selected component (if applicable): 4.14.2-300.fc27.x86_64 [root@lenovo-rd230-02 testcases]# rpm -qa | grep glibc glibc-headers-2.26-16.fc27.x86_64 glibc-common-2.26-16.fc27.x86_64 glibc-langpack-en-2.26-16.fc27.x86_64 glibc-devel-2.26-16.fc27.x86_64 glibc-2.26-16.fc27.x86_64 How reproducible: Always Steps to Reproduce: 1. compile the reproducer # gcc -o test test.c 2. run the reproducer # ./test Actual results: Expected results: Additional info: It could pass on Fedora 25 $ uname -r 4.8.6-300.fc25.x86_64 $ rpm -qa | grep glibc glibc-headers-2.24-3.fc25.x86_64 glibc-common-2.24-3.fc25.x86_64 glibc-all-langpacks-2.24-3.fc25.x86_64 glibc-2.24-3.fc25.x86_64 glibc-devel-2.24-3.fc25.x86_64