diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-04-16 09:51:05 +0100 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-04-16 09:51:05 +0100 |
commit | d64b72dd1f24d29a3f0ecd4d9a0039fbf5a2644e (patch) | |
tree | ce0eaf8d7325effa81b9cef7ec228dd454553e6b /lib | |
parent | f7bc3ebb027dfe18cbb97f698db9c7d7eceb07f1 (diff) |
Correctly use the result of the resolution in the alert.
There was a bug in that we used the same local-variable "result"
for two purposes, trashing the intended use-case.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/custodian/alerts/mauve.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/custodian/alerts/mauve.rb b/lib/custodian/alerts/mauve.rb index 2b48fbc..d2b3a12 100644 --- a/lib/custodian/alerts/mauve.rb +++ b/lib/custodian/alerts/mauve.rb @@ -338,12 +338,11 @@ module Custodian # # Return the formatted message # - ips.each do |result| - - if Custodian::Util::Bytemark.inside?(result.to_s) - result += "<p>#{host} resolves to #{result} which is inside the Bytemark network.</p>" + ips.each do |ipaddr| + if Custodian::Util::Bytemark.inside?(ipaddr.to_s) + result += "<p>#{host} resolves to #{ipaddr} which is inside the Bytemark network.</p>" else - result += "<p>#{host} resolves to #{result} which is OUTSIDE the Bytemark network.</p>" + result += "<p>#{host} resolves to #{ipaddr} which is OUTSIDE the Bytemark network.</p>" end end |