summaryrefslogtreecommitdiff
path: root/pimd/mtracebis.c
diff options
context:
space:
mode:
Diffstat (limited to 'pimd/mtracebis.c')
-rw-r--r--pimd/mtracebis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pimd/mtracebis.c b/pimd/mtracebis.c
index 1b812de92c..3b69964960 100644
--- a/pimd/mtracebis.c
+++ b/pimd/mtracebis.c
@@ -26,7 +26,6 @@
#include "checksum.h"
#include "prefix.h"
#include "mtracebis_routeget.h"
-
#include <sys/select.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -64,13 +63,14 @@ static void version(void)
static void print_host(struct in_addr addr)
{
struct hostent *h;
+ char buf[PREFIX_STRLEN];
h = gethostbyaddr(&addr, sizeof(addr), AF_INET);
if (h == NULL)
printf("?");
else
printf("%s", h->h_name);
- printf(" (%s) ", inet_ntoa(addr));
+ printf(" (%s) ", inet_ntop(AF_INET, &addr, buf, sizeof(buf)));
}
static void print_line_no(int i)