mirror of
https://github.com/duncs/clusterssh.git
synced 2025-07-03 01:43:25 +00:00
Alternative IPv6 address port
Allow for parsing ports from 'xxxx:xxxx:xxxx:xxxx/pppp' style IPv6 addresses
This commit is contained in:
parent
d439a777b3
commit
0853d8fee6
3 changed files with 117 additions and 19 deletions
|
@ -216,16 +216,16 @@ sub parse_host_string {
|
|||
$username = $1 || q{};
|
||||
}
|
||||
|
||||
# Cannot check for a port with this type of IPv6 string
|
||||
#if ( $host_string =~ s/\A(?::(\d+)\A)// ) {
|
||||
# $port = $1 || q{};
|
||||
#}
|
||||
|
||||
# check for any geometry settings
|
||||
if ( $host_string =~ s/(?:=(.*?)$)// ) {
|
||||
$geometry = $1 || q{};
|
||||
}
|
||||
|
||||
# Check for a '/nnnn' port definition
|
||||
if ( $host_string =~ s!(?:/(\d+)$)!! ) {
|
||||
$port = $1 || q{};
|
||||
}
|
||||
|
||||
# use number of colons as a possible indicator
|
||||
my $colon_count = $host_string =~ tr/://;
|
||||
|
||||
|
@ -277,7 +277,7 @@ sub parse_host_string {
|
|||
type => 'ipv6',
|
||||
);
|
||||
}
|
||||
else {
|
||||
elsif ( $colon_count == 9 ) {
|
||||
if ( $host_string =~ s/:(\d+)\A// ) {
|
||||
$port = $1;
|
||||
}
|
||||
|
@ -302,8 +302,6 @@ sub parse_host_string {
|
|||
);
|
||||
}
|
||||
|
||||
# Due to above rules, we'll never get this far anyhow
|
||||
|
||||
# if we got this far, we didnt parse the host_string properly
|
||||
croak(
|
||||
App::ClusterSSH::Exception->throw(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue