[monitoring-plugins] must use host_name and not server_address in URL, ...

Andreas Baumann git at monitoring-plugins.org
Mon Apr 24 08:50:12 CEST 2017


 Module: monitoring-plugins
 Branch: feature_check_curl
 Commit: 5331699559d8032cb12b934956d93f35c60126d5
 Author: Andreas Baumann <mail at andreasbaumann.cc>
   Date: Mon Apr 24 02:38:03 2017 -0400
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=5331699

must use host_name and not server_address in URL, CN subject mismatch

---

 plugins/check_curl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index 050c0d4..87fa1da 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -325,9 +325,9 @@ check_http (void)
 
   /* compose URL */
   snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s%s", use_ssl ? "https" : "http",
-    server_address, server_url);
+    host_name, server_url);
   handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_URL, url), "CURLOPT_URL");
-
+  
   /* set port */
   handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_PORT, server_port), "CURLOPT_PORT");
 



More information about the Commits mailing list