mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-11 09:40:05 -04:00
check_icmp: emit error if multiple protocol version
As we do not support checking both IPv4 and IPv6 hosts in one execution we emit an error if multiple protocol versions are defined in the cmd line args. Signed-off-by: Jacob Hansen <jhansen@op5.com>
This commit is contained in:
parent
7a660b3f01
commit
ca6efcd02b
1 changed files with 4 additions and 0 deletions
|
|
@ -467,10 +467,14 @@ main(int argc, char **argv)
|
|||
unsigned short size;
|
||||
switch(arg) {
|
||||
case '4':
|
||||
if (address_family != -1)
|
||||
crash("Multiple protocol versions not supported");
|
||||
address_family = AF_INET;
|
||||
break;
|
||||
case '6':
|
||||
#ifdef USE_IPV6
|
||||
if (address_family != -1)
|
||||
crash("Multiple protocol versions not supported");
|
||||
address_family = AF_INET6;
|
||||
#else
|
||||
usage (_("IPv6 support not available\n"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue