aboutsummaryrefslogtreecommitdiffstats
path: root/nametoaddr.c
diff options
context:
space:
mode:
authoritojun <itojun>2003-12-24 08:27:04 +0000
committeritojun <itojun>2003-12-24 08:27:04 +0000
commit08ef9a54d2613a53d847cc321c8ab3f9d43d15cf (patch)
tree27311b9c5ad8f5ebad5b4fd5b8f8fe24e89536a1 /nametoaddr.c
parent86c7fc47a52ad63832e4e6b6fc8412a130a23a0a (diff)
some getaddrinfo(3) can return multiple address against SOCK_STREAM (like tcp
adn sctp). hardcode to tcp for now. suz@kame
Diffstat (limited to 'nametoaddr.c')
-rw-r--r--nametoaddr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nametoaddr.c b/nametoaddr.c
index 3a58a8f..70b64ce 100644
--- a/nametoaddr.c
+++ b/nametoaddr.c
@@ -24,7 +24,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.71 2003-11-19 18:14:18 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.72 2003-12-24 08:27:04 itojun Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -124,6 +124,7 @@ pcap_nametoaddrinfo(const char *name)
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM; /*not really*/
+ hints.ai_socktype = IPPROTO_TCP; /*not really*/
error = getaddrinfo(name, NULL, &hints, &res);
if (error)
return NULL;