mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
set ai_socktype in the hints to getaddrinfo, so that the result doesn't
contain duplicate addresses.
This commit is contained in:
parent
ca50fa0230
commit
0f1938c982
1 changed files with 2 additions and 1 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: getaddresses.c,v 1.1 2001/11/14 22:08:37 bwelling Exp $ */
|
||||
/* $Id: getaddresses.c,v 1.2 2001/11/14 23:03:42 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <string.h>
|
||||
|
|
@ -89,6 +89,7 @@ bind9_getaddresses(const char *hostname, in_port_t port,
|
|||
hints.ai_family = PF_INET6;
|
||||
else
|
||||
hints.ai_family = PF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
result = getaddrinfo(hostname, NULL, &hints, &ai);
|
||||
switch (result) {
|
||||
case 0:
|
||||
|
|
|
|||
Loading…
Reference in a new issue