Skip to content

More optional ipv6 tests #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions tests/draft2019-09/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,41 @@
"description": "ipv4 segment must have 4 octets",
"data": "1:2:3:4:1.2.3",
"valid": false
},
{
"description": "leading whitespace is invalid",
"data": " ::1",
"valid": false
},
{
"description": "trailing whitespace is invalid",
"data": "::1 ",
"valid": false
},
{
"description": "netmask is not a part of ipv6 address",
"data": "fe80::/64",
"valid": false
},
{
"description": "zone id is not a part of ipv6 address",
"data": "fe80::a%eth1",
Copy link
Member

@Julian Julian Jul 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oy, looks like inet_pton / AF_INET6 happily accepts zone IDs, which is how I assume most folks have actually implemented IPv6 validation...

"valid": false
},
{
"description": "a long valid ipv6",
"data": "1000:1000:1000:1000:1000:1000:255.255.255.255",
"valid": true
},
{
"description": "a long invalid ipv6, below length limit, first",
"data": "100:100:100:100:100:100:255.255.255.255.255",
"valid": false
},
{
"description": "a long invalid ipv6, below length limit, second",
"data": "100:100:100:100:100:100:100:255.255.255.255",
"valid": false
}
]
}
Expand Down
35 changes: 35 additions & 0 deletions tests/draft4/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,41 @@
"description": "ipv4 segment must have 4 octets",
"data": "1:2:3:4:1.2.3",
"valid": false
},
{
"description": "leading whitespace is invalid",
"data": " ::1",
"valid": false
},
{
"description": "trailing whitespace is invalid",
"data": "::1 ",
"valid": false
},
{
"description": "netmask is not a part of ipv6 address",
"data": "fe80::/64",
"valid": false
},
{
"description": "zone id is not a part of ipv6 address",
"data": "fe80::a%eth1",
"valid": false
},
{
"description": "a long valid ipv6",
"data": "1000:1000:1000:1000:1000:1000:255.255.255.255",
"valid": true
},
{
"description": "a long invalid ipv6, below length limit, first",
"data": "100:100:100:100:100:100:255.255.255.255.255",
"valid": false
},
{
"description": "a long invalid ipv6, below length limit, second",
"data": "100:100:100:100:100:100:100:255.255.255.255",
"valid": false
}
]
}
Expand Down
35 changes: 35 additions & 0 deletions tests/draft6/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,41 @@
"description": "ipv4 segment must have 4 octets",
"data": "1:2:3:4:1.2.3",
"valid": false
},
{
"description": "leading whitespace is invalid",
"data": " ::1",
"valid": false
},
{
"description": "trailing whitespace is invalid",
"data": "::1 ",
"valid": false
},
{
"description": "netmask is not a part of ipv6 address",
"data": "fe80::/64",
"valid": false
},
{
"description": "zone id is not a part of ipv6 address",
"data": "fe80::a%eth1",
"valid": false
},
{
"description": "a long valid ipv6",
"data": "1000:1000:1000:1000:1000:1000:255.255.255.255",
"valid": true
},
{
"description": "a long invalid ipv6, below length limit, first",
"data": "100:100:100:100:100:100:255.255.255.255.255",
"valid": false
},
{
"description": "a long invalid ipv6, below length limit, second",
"data": "100:100:100:100:100:100:100:255.255.255.255",
"valid": false
}
]
}
Expand Down
35 changes: 35 additions & 0 deletions tests/draft7/optional/format/ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,41 @@
"description": "ipv4 segment must have 4 octets",
"data": "1:2:3:4:1.2.3",
"valid": false
},
{
"description": "leading whitespace is invalid",
"data": " ::1",
"valid": false
},
{
"description": "trailing whitespace is invalid",
"data": "::1 ",
"valid": false
},
{
"description": "netmask is not a part of ipv6 address",
"data": "fe80::/64",
"valid": false
},
{
"description": "zone id is not a part of ipv6 address",
"data": "fe80::a%eth1",
"valid": false
},
{
"description": "a long valid ipv6",
"data": "1000:1000:1000:1000:1000:1000:255.255.255.255",
"valid": true
},
{
"description": "a long invalid ipv6, below length limit, first",
"data": "100:100:100:100:100:100:255.255.255.255.255",
"valid": false
},
{
"description": "a long invalid ipv6, below length limit, second",
"data": "100:100:100:100:100:100:100:255.255.255.255",
"valid": false
}
]
}
Expand Down