summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorMichael Brown2015-02-19 15:02:07 +0100
committerMichael Brown2015-02-19 15:02:07 +0100
commitbb1abb2b213adceb606ff458e3786c8c2ea4dc8a (patch)
tree95b4a41c9a1374798662f4a61e193de1a1836753 /src/tests
parent[legal] Add missing copyright header to net/ipv4.c (diff)
downloadipxe-bb1abb2b213adceb606ff458e3786c8c2ea4dc8a.tar.gz
ipxe-bb1abb2b213adceb606ff458e3786c8c2ea4dc8a.tar.xz
ipxe-bb1abb2b213adceb606ff458e3786c8c2ea4dc8a.zip
[ipv4] Rewrite inet_aton()
The implementation of inet_aton() has an unknown provenance. Rewrite this code to avoid potential licensing uncertainty. Also move the code from core/misc.c to its logical home in net/ipv4.c, and add a few extra test cases. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/ipv4_test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tests/ipv4_test.c b/src/tests/ipv4_test.c
index ba18f845..a72dcc51 100644
--- a/src/tests/ipv4_test.c
+++ b/src/tests/ipv4_test.c
@@ -138,6 +138,8 @@ static void ipv4_test_exec ( void ) {
inet_aton_fail_ok ( "256.0.0.1" ); /* Byte out of range */
inet_aton_fail_ok ( "212.13.204.60.1" ); /* Too long */
inet_aton_fail_ok ( "127.0.0" ); /* Too short */
+ inet_aton_fail_ok ( "1.2.3.a" ); /* Invalid characters */
+ inet_aton_fail_ok ( "127.0..1" ); /* Missing bytes */
}
/** IPv4 self-test */