diff options
author | Daniel Stirnimann <daniel.stirnimann@gmail.com> | 2015-10-15 08:59:32 (GMT) |
---|---|---|
committer | Oliver Skibbe <oliskibbe@gmail.com> | 2015-10-15 08:59:32 (GMT) |
commit | 24eea9fa34d009971378fda6754ce0a9ac01f21d (patch) | |
tree | 20689cc3cdb9ef4d980e349733c9b130a219dd36 | |
parent | dfe66c01c0b556dfbac9c1d901d3ba9ed6a1deac (diff) | |
download | monitoring-plugins-24eea9fa34d009971378fda6754ce0a9ac01f21d.tar.gz |
check_dig: expected answer is now incasesensitiverefs/pull/1386/head
check_dig was casesensitive if an expected answer is given.
Switching strstr with strcasestr fixes this issue
While testing i noticed a bug where expected is not an exact match
New issue for that is opened #1385
This fix closes #1233
-rw-r--r-- | plugins/check_dig.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_dig.c b/plugins/check_dig.c index db4b20e..473d4b9 100644 --- a/plugins/check_dig.c +++ b/plugins/check_dig.c | |||
@@ -125,7 +125,7 @@ main (int argc, char **argv) | |||
125 | if (verbose) | 125 | if (verbose) |
126 | printf ("%s\n", chld_out.line[i]); | 126 | printf ("%s\n", chld_out.line[i]); |
127 | 127 | ||
128 | if (strstr (chld_out.line[i], (expected_address == NULL ? query_address : expected_address)) != NULL) { | 128 | if (strcasestr (chld_out.line[i], (expected_address == NULL ? query_address : expected_address)) != NULL) { |
129 | msg = chld_out.line[i]; | 129 | msg = chld_out.line[i]; |
130 | result = STATE_OK; | 130 | result = STATE_OK; |
131 | 131 | ||