# Issue with inet_cidr_pton



## realbodhi (May 10, 2011)

I'm using inet_cidr_pton to validate and parse IPv6 addresses. It works for most of the cases. However, the following addresses are returned valid by it:


```
char str[16];
int msk;
printf("i %d\n", inet_cidr_pton(AF_INET6, "/0", &str, &msk));
printf("i %d\n", inet_cidr_pton(AF_INET6, "1234", &str, &msk));
printf("i %d\n", inet_cidr_pton(AF_INET6, "12345", &str, &msk));
```
Looks like a bug to me. Or am I doing something wrong?
FreeBSD 7.2.


----------



## SirDice (May 10, 2011)

They're just as valid as 1249726307 is for IPv4.

Don't believe me? http://1249726307


----------

