Browse code

Autotools: fix test suite for IPv6-only systems

The suite uses hardcoded 127.0.0.1 for testing. Debian has at least
one build daemon which is IPv6 only and the testsuite fails there.

This resolves https://bugzilla.clamav.net/show_bug.cgi?id=12633

Micah Snyder authored on 2021/04/04 18:47:06
Showing 2 changed files
... ...
@@ -279,7 +279,7 @@ const struct clam_option __clam_options[] = {
279 279
     {"TCPSocket", NULL, 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, -1, NULL, 0, OPT_CLAMD, "A TCP port number the daemon will listen on.", "3310"},
280 280
 
281 281
     /* FIXME: add a regex for IP addr */
282
-    {"TCPAddr", NULL, 0, CLOPT_TYPE_STRING, NULL, -1, NULL, FLAG_MULTIPLE, OPT_CLAMD, "By default clamd binds to INADDR_ANY.\nThis option allows you to restrict the TCP address and provide\nsome degree of protection from the outside world.", "127.0.0.1"},
282
+    {"TCPAddr", NULL, 0, CLOPT_TYPE_STRING, NULL, -1, NULL, FLAG_MULTIPLE, OPT_CLAMD, "By default clamd binds to INADDR_ANY.\nThis option allows you to restrict the TCP address and provide\nsome degree of protection from the outside world.", "localhost"},
283 283
 
284 284
     {"MaxConnectionQueueLength", NULL, 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, 200, NULL, 0, OPT_CLAMD, "Maximum length the queue of pending connections may grow to.", "30"},
285 285
 
... ...
@@ -77,7 +77,7 @@ LogVerbose yes
77 77
 PidFile `pwd`/clamd-test.pid
78 78
 DatabaseDirectory `pwd`/test-db
79 79
 LocalSocket clamd-test.socket
80
-TCPAddr 127.0.0.1
80
+TCPAddr localhost
81 81
 # using different port here to avoid conflicts with system clamd daemon
82 82
 TCPSocket $port
83 83
 ExitOnOOM yes