diff options
author | Michael Brown <mcb30@ipxe.org> | 2015-02-19 14:02:07 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2015-02-19 14:02:07 +0000 |
commit | bb1abb2b213adceb606ff458e3786c8c2ea4dc8a (patch) | |
tree | 95b4a41c9a1374798662f4a61e193de1a1836753 /src/tests | |
parent | 095c007aa35259b9eb7c91d7f5c3484e8d14a7b1 (diff) | |
download | ipxe-bb1abb2b213adceb606ff458e3786c8c2ea4dc8a.zip ipxe-bb1abb2b213adceb606ff458e3786c8c2ea4dc8a.tar.gz ipxe-bb1abb2b213adceb606ff458e3786c8c2ea4dc8a.tar.bz2 |
[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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tests/ipv4_test.c b/src/tests/ipv4_test.c index ba18f84..a72dcc5 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 */ |