diff options
author | Lorenz <12514511+RincewindsHat@users.noreply.github.com> | 2022-03-15 21:00:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-15 21:00:55 (GMT) |
commit | 605405557102c04e740fc3249675cc5154436d11 (patch) | |
tree | 5c4ff8a018d3ccc1bc784a6ea0bbf6514f91ff85 /plugins-root/t | |
parent | 6c8b45a1691f4ce98f1c559a1e9cd1fef68c0fe2 (diff) | |
download | monitoring-plugins-605405557102c04e740fc3249675cc5154436d11.tar.gz |
check_icmp: buffer offerflow (#1733)
* Fix different overflows
* Less includes
* Add testcases
* Remove unused variable
* Remove unused and commented includes
Diffstat (limited to 'plugins-root/t')
-rw-r--r-- | plugins-root/t/check_icmp.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins-root/t/check_icmp.t b/plugins-root/t/check_icmp.t index 55edc31..f6aa681 100644 --- a/plugins-root/t/check_icmp.t +++ b/plugins-root/t/check_icmp.t | |||
@@ -12,7 +12,7 @@ my $allow_sudo = getTestParameter( "NP_ALLOW_SUDO", | |||
12 | "no" ); | 12 | "no" ); |
13 | 13 | ||
14 | if ($allow_sudo eq "yes" or $> == 0) { | 14 | if ($allow_sudo eq "yes" or $> == 0) { |
15 | plan tests => 18; | 15 | plan tests => 20; |
16 | } else { | 16 | } else { |
17 | plan skip_all => "Need sudo to test check_icmp"; | 17 | plan skip_all => "Need sudo to test check_icmp"; |
18 | } | 18 | } |
@@ -89,3 +89,8 @@ $res = NPTest->testCmd( | |||
89 | is( $res->return_code, 0, "IPv4 source_ip accepted" ); | 89 | is( $res->return_code, 0, "IPv4 source_ip accepted" ); |
90 | like( $res->output, $successOutput, "Output OK" ); | 90 | like( $res->output, $successOutput, "Output OK" ); |
91 | 91 | ||
92 | $res = NPTest->testCmd( | ||
93 | "$sudo ./check_icmp -H $host_responsive -b 65507" | ||
94 | ); | ||
95 | is( $res->return_code, 0, "Try max paket size" ); | ||
96 | like( $res->output, $successOutput, "Output OK - Didn't overflow" ); | ||