mirror of
https://github.com/ipxe/ipxe
synced 2025-12-18 10:30:23 +03:00
[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>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user