]> sjero.net Git - wget/blobdiff - src/host.c
Introduce `show_all_dns_entries'.
[wget] / src / host.c
index 34dc7084a31d8cd358e603158da520226089875d..505f706c02a75233593f6a6e134a085193019dcb 100644 (file)
@@ -822,11 +822,15 @@ lookup_host (const char *host, int flags)
 #endif /* not ENABLE_IPV6 */
 
   /* Print the addresses determined by DNS lookup, but no more than
-     three.  */
+     three if show_all_dns_entries is not specified.  */
   if (!silent && !numeric_address)
     {
       int i;
-      int printmax = al->count <= 3 ? al->count : 3;
+      int printmax = al->count;
+
+      if (! opt.show_all_dns_entries)
+        printmax = 3;
+
       for (i = 0; i < printmax; i++)
         {
           logputs (LOG_VERBOSE, print_address (al->addresses + i));