--- a/src/cssh.pl +++ b/src/cssh.pl @@ -937,7 +937,7 @@ # check for correct syntax of using [] # See http://tools.ietf.org/html/rfc2732 for more details - if ( $connect_string =~ m/^\[([\w:]+)\](?::(\d+))?$/xsm ) { + if ( $connect_string =~ m/^\[([\w:%]+)\](?::(\d+))?$/xsm ) { logmsg( 3, 'connect_string contains IPv6 address' ); $server = $1; $port = $2; @@ -975,7 +975,7 @@ # method will warn if it cannot connect anyhow # However, this also catchs IPv4 addresses, possibly with ports ( $server, $port ) - = $connect_string =~ m/^([\w.-]+)(?::(\d+))?$/xsm; + = $connect_string =~ m/^([\w%.-]+)(?::(\d+))?$/xsm; } } }