diff options
author | Laurent Deniel <laurent.deniel@free.fr> | 2000-08-08 16:21:24 +0000 |
---|---|---|
committer | Laurent Deniel <laurent.deniel@free.fr> | 2000-08-08 16:21:24 +0000 |
commit | 58bdaa850e6bf96d01c78b61d24d1f2f0f29125c (patch) | |
tree | 6480bb130ea41a1a9cf5109a0129f2e55ba36f66 /resolv.c | |
parent | cedac6e3f181c62d89eaecfb88d8d803b8e79131 (diff) | |
download | wireshark-58bdaa850e6bf96d01c78b61d24d1f2f0f29125c.tar.gz wireshark-58bdaa850e6bf96d01c78b61d24d1f2f0f29125c.tar.bz2 wireshark-58bdaa850e6bf96d01c78b61d24d1f2f0f29125c.zip |
- improve/fix add_host_name
- add hostname/IP in host hashtable from DNS answers
(currently only type A RR).
svn path=/trunk/; revision=2228
Diffstat (limited to 'resolv.c')
-rw-r--r-- | resolv.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* resolv.c * Routines for network object lookup * - * $Id: resolv.c,v 1.24 2000/07/14 07:11:53 guy Exp $ + * $Id: resolv.c,v 1.25 2000/08/08 16:21:24 deniel Exp $ * * Laurent Deniel <deniel@worldnet.fr> * @@ -1038,6 +1038,10 @@ extern void add_host_name(u_int addr, u_char *name) (hashname_t *)g_malloc(sizeof(hashname_t)); } else { while(1) { + if (tp->addr == addr && strcmp(tp->name, name) == 0) { + /* address already known */ + return; + } if (tp->next == NULL) { tp->next = (hashname_t *)g_malloc(sizeof(hashname_t)); tp = tp->next; |