Commit graph

21 commits

Author SHA1 Message Date
d6b4cb0f48 Add support for 2001:DB8::8:800:200C:417A
Fix #8
2024-03-04 23:55:42 -03:00
5748ece401 Add support for ::13.1.68.3
Fix #9
2023-09-22 14:04:52 -03:00
e7745f086a Add testcases from RFC 4291 2023-09-22 13:52:55 -03:00
999bf8d5d6 Address 2.2.1 of RFC 4291
Treat `2001:DB8:0:0:8:800:200C:417A` as valid.
2023-09-22 01:24:05 -03:00
eb0b1d3ace isinetaddr -> isinetaddr4, iscidraddr -> iscidraddr4 2023-09-12 15:38:43 -03:00
f6e29e4756 Add isinetaddr6
This change introduces `isinetaddr6`, a function that validates
IPv6 addresses. The interface is identical to isinetaddr, where
0 is returned for an invalid address and 1 is returned for a valid
address.
2023-09-11 22:51:35 -03:00
0dfbdd45e9 Add coverage for a few more edge cases 2023-08-30 06:04:41 -03:00
82693b4d5e iscidraddr: return 0 for 127.0.0.1/322 2023-08-28 00:12:08 -03:00
97a2f8f42e Apply a small optimization to iscidraddr.c 2023-08-27 22:58:16 -03:00
9bcd608b86 tests: improve 2023-08-27 05:38:26 -03:00
f97b5906f4 Add iscidraddr 2023-08-26 23:38:15 -03:00
4118c4b573 Fix edgecase (4...4 is invalid) 2023-08-26 00:32:11 -03:00
e0dcac0c2c Handle additional edge cases as invalid
"192.168.2" is now caught as invalid, along with
"...4".
2023-08-25 21:01:34 -03:00
df4a6f0a88 Add testcases 2023-08-25 20:08:22 -03:00
9baa5f9fe4 Treat "123.45.67.891" as invalid 2023-08-25 20:05:43 -03:00
918d43e4e9 Small tweak 2023-08-25 18:58:59 -03:00
8d71ef6bd4 Avoid buffer overflow 2023-08-25 18:37:53 -03:00
74fef68c8d Stack smash test 2023-08-25 18:32:06 -03:00
24c3bfb681 Handle 'str' being NULL 2023-08-25 18:26:21 -03:00
ae64ca4671 tests: improve 2023-08-25 18:26:21 -03:00
7c02f425c5 First commit 2023-08-25 15:57:09 -03:00