|
@@ -13,15 +13,15 @@
|
13
|
13
|
dnl * *
|
14
|
14
|
--- a/src/libs/zbxsysinfo/common/net.c
|
15
|
15
|
+++ b/src/libs/zbxsysinfo/common/net.c
|
16
|
|
-@@ -425,6 +425,7 @@ static int dns_query(AGENT_REQUEST *requ
|
17
|
|
- if (-1 == res_init()) /* initialize always, settings might have changed */
|
|
16
|
+@@ -450,6 +450,7 @@ static int dns_query(AGENT_REQUEST *requ
|
18
|
17
|
return SYSINFO_RET_FAIL;
|
|
18
|
+ }
|
19
|
19
|
|
20
|
20
|
+#if defined(HAVE_RES_MKQUERY) && defined(HAVE_RES_SEND)
|
21
|
21
|
if (-1 == (res = res_mkquery(QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf))))
|
22
|
|
- return SYSINFO_RET_FAIL;
|
23
|
|
-
|
24
|
|
-@@ -449,6 +450,11 @@ static int dns_query(AGENT_REQUEST *requ
|
|
22
|
+ {
|
|
23
|
+ SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot create DNS query: %s", zbx_strerror(errno)));
|
|
24
|
+@@ -480,6 +481,11 @@ static int dns_query(AGENT_REQUEST *requ
|
25
|
25
|
_res.retry = retry;
|
26
|
26
|
|
27
|
27
|
res = res_send(buf, res, answer.buffer, sizeof(answer.buffer));
|