summaryrefslogtreecommitdiffstats
path: root/plugins/check_swap.c
diff options
context:
space:
mode:
authoralvar <8402811+oxzi@users.noreply.github.com>2024-03-18 09:05:04 (GMT)
committerGitHub <noreply@github.com>2024-03-18 09:05:04 (GMT)
commit93cd51bc6221ffc846c69135f2746120683b44c5 (patch)
treed05cdd253f1d5621c605c52413091bb8406af3c1 /plugins/check_swap.c
parent0488426c7e8018d77734fb0e46328182de28f76a (diff)
downloadmonitoring-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 'plugins/check_swap.c')
0 files changed, 0 insertions, 0 deletions