Connection: Support IPv6 addresses

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2013-08-17 05:13:27 -04:00
parent 110cce3773
commit 553918d3f2
6 changed files with 177 additions and 82 deletions
-7
View File
@@ -127,13 +127,6 @@ int main( int argc, char *argv[] )
desired_port = argv[ optind + 1 ];
/* Sanity-check arguments */
if ( ip
&& ( strspn( ip, "0123456789." ) != strlen( ip ) ) ) {
fprintf( stderr, "%s: Bad IP address (%s)\n\n", argv[ 0 ], ip );
usage( argv[ 0 ] );
exit( 1 );
}
if ( desired_port
&& ( strspn( desired_port, "0123456789" ) != strlen( desired_port ) ) ) {
fprintf( stderr, "%s: Bad UDP port (%s)\n\n", argv[ 0 ], desired_port );