mirror of
https://github.com/proxytunnel/proxytunnel.git
synced 2026-07-17 16:34:53 +00:00
Make specifying local proxy by IPv6 address work.
The pattern meant for parsing a host name (or IPv4 address) also matched the head of an IPv6 address, resulting in an invalid host name causing failure later on. The code meant for parsing an IPv6 address was never reached.
This commit is contained in:
parent
2827a6647e
commit
b8c2189ff3
1 changed files with 1 additions and 1 deletions
|
|
@ -631,7 +631,7 @@ int cmdline_parser( int argc, char * const *argv, struct gengetopt_args_info *ar
|
|||
message( "Out of memory\n" );
|
||||
exit(1);
|
||||
}
|
||||
snprintf( proxy_arg_fmt, sizeof(proxy_arg_fmt), "%%%zu[^:]:%%5u", proxy_arg_len - 1 );
|
||||
snprintf( proxy_arg_fmt, sizeof(proxy_arg_fmt), "%%%zu[^][:]:%%5u", proxy_arg_len - 1 );
|
||||
r = sscanf( args_info->proxy_arg, proxy_arg_fmt, phost, &pport );
|
||||
if ( r != 2 ) {
|
||||
/* try bracket-enclosed IPv6 literal */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue