Ver código fonte

Merge pull request #531 from sawolf/check_icmp-ip-unset

Should fix #530 - 'ip' should be set even if not debugging
Sebastian Wolf 6 anos atrás
pai
commit
15ec067a4a
2 arquivos alterados com 5 adições e 1 exclusões
  1. 4 0
      NEWS
  2. 1 1
      plugins-root/check_icmp.c

+ 4 - 0
NEWS

@@ -1,5 +1,9 @@
 This file documents the major additions and syntax changes between releases.
 
+2.3.2 2020-03-??
+	FIXES
+	check_icmp: fix issues when not running in debug mode (#530)
+
 2.3.2 2020-02-20
 	FIXES
 	build: Fix broken builds on some systems, including Homebrew (#508)

+ 1 - 1
plugins-root/check_icmp.c

@@ -1018,8 +1018,8 @@ static int wait_for_reply(int sock, u_int t) {
       return n;
     }
 
+    ip = (union ip_hdr *)buf;
     if (debug > 1) {
-      ip = (union ip_hdr *)buf;
       char address[address_length(address_family)];
       parse_address_string(address_family, &resp_addr, address,
                            sizeof(address));