diff options
author | alvar <8402811+oxzi@users.noreply.github.com> | 2024-03-18 09:05:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-18 09:05:04 (GMT) |
commit | 93cd51bc6221ffc846c69135f2746120683b44c5 (patch) | |
tree | d05cdd253f1d5621c605c52413091bb8406af3c1 /acinclude.m4 | |
parent | 0488426c7e8018d77734fb0e46328182de28f76a (diff) | |
download | monitoring-plugins-93cd51bc6221ffc846c69135f2746120683b44c5.tar.gz |
check_ircd: IPv6 support (#1995)
The prior bindRemote function was restricted to IPv4 by explicitly using
address family specific functions as pack_sockaddr_in or unparametrized
gethostbyname. Since Perl 5.14, released in early 2013, there is
IO::Socket::IP, which supports lookups and connects for a dual stacked
network.
By switching the connection establishment code, the plugin is now able
to establish connections to IPv6-only hosts. Furthermore, additional -4
and -6 flags were introduced to enforce a specific address family.
> $ netstat -p tcp -ln | grep 6667
> tcp6 0 0 *.6667 *.* LISTEN
> $ ./plugins-scripts/check_ircd -H localhost
> IRCD ok - Current Local Users: 4
> $ ./plugins-scripts/check_ircd -H localhost -4
> IRCD UNKNOWN: Could not start socket (Connection refused)
> $ ./plugins-scripts/check_ircd -H localhost -6
> IRCD ok - Current Local Users: 4
Diffstat (limited to 'acinclude.m4')
0 files changed, 0 insertions, 0 deletions