Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

check_ping: Treat ICMPv6 "Address unreachable" as "Host unreachable"

In ICMPv6 "Host unreachable" has been renamed to "Address unreachable"
(see RFC4443 3.1). Handle ping6 returning "Address unreachable" and map
it to the "Host unreachable" plugin output.
  • Loading branch information...
commit ff098243ab9e41696f91df99135d80546cefecbc 1 parent 4c30935
Bernhard Schmidt authored April 17, 2012

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  plugins/check_ping.c
4  plugins/check_ping.c
@@ -517,7 +517,9 @@ error_scan (char buf[MAX_INPUT_BUFFER], const char *addr)
517 517
 		strstr (buf, "Destination Net Unreachable")
518 518
 		)
519 519
 		die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)"), addr);
520  
-	else if (strstr (buf, "Destination Host Unreachable"))
  520
+	else if (strstr (buf, "Destination Host Unreachable") ||
  521
+		strstr (buf, "Address unreachable")
  522
+		)
521 523
 		die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)"), addr);
522 524
 	else if (strstr (buf, "Destination Port Unreachable"))
523 525
 		die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)"), addr);

0 notes on commit ff09824

Please sign in to comment.
Something went wrong with that request. Please try again.