diff options
author | Gerald Combs <gerald@wireshark.org> | 2006-01-19 23:01:24 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2006-01-19 23:01:24 +0000 |
commit | b3d0b97635c4bd1d7123985fbc2af950e0c01be1 (patch) | |
tree | 48ec11c59d51fcbb9318127d9f3e809a0bd89c38 | |
parent | 9d6de675a4a29a829caa0e4482e60544bf18445b (diff) |
Make sure we don't use the ADNS version of inet_aton; it's broken.
This fixes bug 523, but exposes more of bug 658.
The TACACS and SDP dissectors don't call inet_aton(), so don't include it.
svn path=/trunk/; revision=17056
-rw-r--r-- | epan/addr_resolv.c | 25 | ||||
-rw-r--r-- | epan/dissectors/packet-sdp.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-tacacs.c | 3 |
3 files changed, 14 insertions, 17 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c index 3c503d1d74..aa144cca8e 100644 --- a/epan/addr_resolv.c +++ b/epan/addr_resolv.c @@ -104,6 +104,9 @@ #ifdef HAVE_GNU_ADNS # include <errno.h> # include <adns.h> +# ifdef inet_aton +# undef inet_aton +# endif #endif #if defined(_WIN32) && defined(INET6) @@ -394,7 +397,7 @@ static gchar *host_name_lookup(guint addr, gboolean *found) tp->next = NULL; #ifdef HAVE_GNU_ADNS - if ((g_resolv_flags & RESOLV_CONCURRENT) && + if ((g_resolv_flags & RESOLV_CONCURRENT) && prefs.name_resolve_concurrency > 0 && gnu_adns_initialized) { qmsg = g_malloc(sizeof(adns_queue_msg_t)); @@ -1748,7 +1751,7 @@ host_name_lookup_cleanup(void) { adns_queue_head = g_list_remove(adns_queue_head, qdata); g_free(qdata); } - + if (gnu_adns_initialized) adns_finish(ads); } @@ -1927,30 +1930,30 @@ extern gchar *get_sctp_port(guint port) const gchar *get_addr_name(address *addr) { const gchar *result; - + result = solve_address_to_name(addr); - + if (result!=NULL){ return result; } - + /* if it gets here, either it is of type AT_NONE, */ /* or it should be solvable in address_to_str -unless addr->type is wrongly defined- */ - + if (addr->type == AT_NONE){ return "NONE"; } - + return(address_to_str(addr)); } /* get_addr_name */ - - + + void get_addr_name_buf(address *addr, gchar *buf, guint size) { const gchar *result; - + result = get_addr_name(addr); - + strncpy(buf,result,size); buf[size]='\0'; return; diff --git a/epan/dissectors/packet-sdp.c b/epan/dissectors/packet-sdp.c index d245f20f25..b2f0d9a11f 100644 --- a/epan/dissectors/packet-sdp.c +++ b/epan/dissectors/packet-sdp.c @@ -40,9 +40,6 @@ #ifdef HAVE_ARPA_INET_H #include <arpa/inet.h> #endif -#ifdef NEED_INET_ATON_H -# include <epan/inet_aton.h> -#endif #ifdef HAVE_WINSOCK2_H #include <winsock2.h> /* needed to define AF_ values on Windows */ diff --git a/epan/dissectors/packet-tacacs.c b/epan/dissectors/packet-tacacs.c index 0c40722d3f..246ab8a7b8 100644 --- a/epan/dissectors/packet-tacacs.c +++ b/epan/dissectors/packet-tacacs.c @@ -50,9 +50,6 @@ #ifdef HAVE_ARPA_INET_H #include <arpa/inet.h> #endif -#ifdef NEED_INET_ATON_H -# include <epan/inet_aton.h> -#endif #ifdef HAVE_WINSOCK2_H #include <winsock2.h> /* needed to define AF_ values on Windows */ |