]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
mtr v0.28 v0.28
authorRoger Wolff <r.e.wolff@bitwizard.nl>
Mon, 2 Nov 1998 00:00:00 +0000 (00:00 +0000)
committerTravis Cross <tc@traviscross.com>
Sun, 3 Feb 2013 20:45:36 +0000 (20:45 +0000)
 - DNS lookups are now suppressed if you don't want them.

source: ftp://ftp.bitwizard.nl/mtr/mtr-0.28.tar.gz

configure.in
report.c

index a0d27ab38a564a118d70df8750be06da14e322b6..d9f5c5764e82fb51e19cf1dbbafd71602def4506 100644 (file)
@@ -1,5 +1,5 @@
 AC_INIT(mtr.c)
-AM_INIT_AUTOMAKE(mtr, 0.27)
+AM_INIT_AUTOMAKE(mtr, 0.28)
 
 AC_SUBST(GTK_OBJ)
 AC_SUBST(CURSES_OBJ)
index 91817818889c20b93ad739c22764f6a19626f3c0..9f2fe3c72bb84b2466ed481eb36317cc61992725 100644 (file)
--- a/report.c
+++ b/report.c
@@ -28,6 +28,8 @@
 #include "report.h"
 #include "net.h"
 
+extern int dns;
+
 void report_open() {
   printf("%-40s LOSS  RCVD  SENT BEST   AVG  WORST\n", "HOST");
   fflush(stdout);
@@ -49,9 +51,9 @@ void report_close() {
       sprintf(name, "???");
     } else {
       haddr = htonl(addr);
-      host = gethostbyaddr((char *)&haddr, sizeof(int), AF_INET);
+      host = dns?gethostbyaddr((char *)&haddr, sizeof(int), AF_INET):NULL;
 
-      if(host != NULL) {
+      if (host != NULL) {
         strncpy(name, host->h_name, 80);
         name[80] = 0;
       } else {