Closed markus2330 closed 4 years ago
I checked in those tests: 343c1222387b85cc6882792960e7f202b39b76e1
There are some test failures though:
If I add those tests to the ipaddr
plugin (which does a regex check) these failures happen:
ipv6 address “::” returned -1 instead of 1
ipv6 address “FF01::101::2” returned 1 instead of -1
ipv6 address “3ffe:b00::1::a” returned 1 instead of -1
ipv6 address “::2:3:4:5:6:7:8” returned -1 instead of 1
ipv6 address “1:2:3:4:5:6:1.2.3.4” returned -1 instead of 1
ipv6 address “1:2:3:4:5::1.2.3.4” returned -1 instead of 1
ipv6 address “1:2:3:4::5:1.2.3.4” returned -1 instead of 1
ipv6 address “0:0:0:0:0:0:13.1.68.3” returned -1 instead of 1
ipv6 address “0:0:0:0:0:FFFF:129.144.52.38” returned -1 instead of 1
ipv6 address “fe80:0:0:0:204:61ff:254.157.241.86” returned -1 instead of 1
ipv6 address “1111:2222:3333:4444::5555:” returned 1 instead of -1
ipv6 address “1111:2222:3333::5555:” returned 1 instead of -1
ipv6 address “1111:2222::5555:” returned 1 instead of -1
ipv6 address “1111::5555:” returned 1 instead of -1
ipv6 address “:1111:2222:3333:4444::5555” returned 1 instead of -1
ipv6 address “:1111:2222:3333::5555” returned 1 instead of -1
ipv6 address “:1111:2222::5555” returned 1 instead of -1
ipv6 address “:1111::5555” returned 1 instead of -1
ipv6 address “:::5555” returned 1 instead of -1
ipv6 address “2001::FFD3::57ab” returned 1 instead of -1
ipv6 address “1::2::3” returned 1 instead of -1
ipv6 address “1:::3:4:5” returned 1 instead of -1
ipv6 address “1111:2222:3333:4444:5555:6666:7777::” returned -1 instead of 1
ipv6 address “::2222:3333:4444:5555:6666:7777:8888” returned -1 instead of 1
ipv6 address “1111:2222:3333:4444:5555:6666:123.123.123.123” returned -1 instead of 1
ipv6 address “1111:2222:3333:4444:5555::123.123.123.123” returned -1 instead of 1
ipv6 address “1111:2222:3333:4444::6666:123.123.123.123” returned -1 instead of 1
ipv6 address “1111:2222:3333::5555:6666:123.123.123.123” returned -1 instead of 1
ipv6 address “1111:2222::4444:5555:6666:123.123.123.123” returned -1 instead of 1
ipv6 address “1111::3333:4444:5555:6666:123.123.123.123” returned -1 instead of 1
ipv6 address “::2222:3333:4444:5555:6666:123.123.123.123” returned -1 instead of 1
ipv6 address “::0:0:0:0:0:0:0” returned -1 instead of 1
ipv6 address “0:0:0:0:0:0:0::” returned -1 instead of 1
ipv6 address “1111:2222:3333:4444:5555:6666:7777:” returned 1 instead of -1
ipv6 address “:2222:3333:4444:5555:6666:7777:8888” returned 1 instead of -1
ipv6 address “1111::3333::5555:6666:7777:8888” returned 1 instead of -1
ipv6 address “1111::3333:4444::6666:7777:8888” returned 1 instead of -1
ipv6 address “1111::3333:4444:5555::7777:8888” returned 1 instead of -1
ipv6 address “1111::3333:4444:5555:6666::8888” returned 1 instead of -1
ipv6 address “1111:2222::4444::6666:7777:8888” returned 1 instead of -1
ipv6 address “1111:2222::4444:5555::7777:8888” returned 1 instead of -1
ipv6 address “1111:2222::4444:5555:6666::8888” returned 1 instead of -1
ipv6 address “1111:2222:3333::5555::7777:8888” returned 1 instead of -1
ipv6 address “1111:2222:3333::5555:6666::8888” returned 1 instead of -1
ipv6 address “1111:2222:3333:4444::6666::8888” returned 1 instead of -1
ipv6 address “:1111:2222:3333:4444:5555::8888” returned 1 instead of -1
ipv6 address “:1111:2222:3333:4444::8888” returned 1 instead of -1
ipv6 address “:1111:2222:3333::8888” returned 1 instead of -1
ipv6 address “:1111:2222::8888” returned 1 instead of -1
ipv6 address “:1111::8888” returned 1 instead of -1
ipv6 address “:::8888” returned 1 instead of -1
ipv6 address “:1111:2222:3333:4444::7777:8888” returned 1 instead of -1
ipv6 address “:1111:2222:3333::7777:8888” returned 1 instead of -1
ipv6 address “:1111:2222::7777:8888” returned 1 instead of -1
ipv6 address “:1111::7777:8888” returned 1 instead of -1
ipv6 address “:::7777:8888” returned 1 instead of -1
ipv6 address “:1111:2222:3333::6666:7777:8888” returned 1 instead of -1
ipv6 address “:1111:2222::6666:7777:8888” returned 1 instead of -1
ipv6 address “:1111::6666:7777:8888” returned 1 instead of -1
ipv6 address “:::6666:7777:8888” returned 1 instead of -1
ipv6 address “:1111:2222::5555:6666:7777:8888” returned 1 instead of -1
ipv6 address “:1111::5555:6666:7777:8888” returned 1 instead of -1
ipv6 address “:::5555:6666:7777:8888” returned 1 instead of -1
ipv6 address “:1111::4444:5555:6666:7777:8888” returned 1 instead of -1
ipv6 address “:::4444:5555:6666:7777:8888” returned 1 instead of -1
ipv6 address “1111:2222:3333:4444:5555:::” returned 1 instead of -1
ipv6 address “1111:2222:3333:4444:::” returned 1 instead of -1
ipv6 address “1111:2222:3333:::” returned 1 instead of -1
ipv6 address “1111:2222:::” returned 1 instead of -1
ipv6 address “1111:::” returned 1 instead of -1
ipv6 address “1111:2222:3333:4444:5555::8888:” returned 1 instead of -1
ipv6 address “1111:2222:3333:4444::8888:” returned 1 instead of -1
ipv6 address “1111:2222:3333::8888:” returned 1 instead of -1
ipv6 address “1111:2222::8888:” returned 1 instead of -1
ipv6 address “1111::8888:” returned 1 instead of -1
ipv6 address “1111:2222:3333:4444::7777:8888:” returned 1 instead of -1
ipv6 address “1111:2222:3333::7777:8888:” returned 1 instead of -1
ipv6 address “1111:2222::7777:8888:” returned 1 instead of -1
ipv6 address “1111::7777:8888:” returned 1 instead of -1
ipv6 address “1111:2222:3333::6666:7777:8888:” returned 1 instead of -1
ipv6 address “1111:2222::6666:7777:8888:” returned 1 instead of -1
ipv6 address “1111::6666:7777:8888:” returned 1 instead of -1
ipv6 address “1111:2222::5555:6666:7777:8888:” returned 1 instead of -1
ipv6 address “1111::5555:6666:7777:8888:” returned 1 instead of -1
ipv6 address “1111::4444:5555:6666:7777:8888:” returned 1 instead of -1
ipv6 address “0:a:b:c:d:e:f::” returned -1 instead of 1
ipv6 address “::0:a:b:c:d:e:f” returned -1 instead of 1
ipv6 address “a:b:c:d:e:f:0::” returned -1 instead of 1
I decided to include it into the network
plugin only which yield the following errors:
ipv6 address “02001:0000:1234:0000:0000:C1C0:ABCD:0876” returned 1 instead of -1
ipv6 address “2001:0000:1234:0000:00001:C1C0:ABCD:0876” returned 1 instead of -1
This seems to be a bug of the netdb.h library?
@tom-wa any idea about the regex problems?
This seems to be a bug of the netdb.h library?
Maybe the tests are wrong? Why are these invalid IPv6 addresses?
They both have trailing zeros
1st test: 02001
2nd test: 00001
On some travis builds also these tests fail (used in the network
):
// Testing IPv4 addresses represented as dotted-quads
// Leading zero's in IPv4 addresses not allowed: some systems treat the leading "0" in ".086" as the start of an octal number
// Update: The BNF in RFC-3986 explicitly defines the dec-octet (for IPv4 addresses) not to have a leading zero
testIPv6("fe80:0000:0000:0000:0204:61ff:254.157.241.086", -1);
testIPv6("1111:2222:3333:4444:5555:6666:00.00.00.00", -1);
testIPv6("1111:2222:3333:4444:5555:6666:000.000.000.000", -1);
I also exclude those tests as there is no way to fix it since its in the library.
I mark this issue stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping the issue by writing a message here or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:
I closed this issue now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:
Tests from http://download.dartware.com/thirdparty/test-ipv6-regex.pl