explicitly specify IPPROTO_UDP when calling getaddrinfo().

Obtained from:	KAME
MFC after:	1 week
This commit is contained in:
Hajimu UMEMOTO 2003-08-18 15:54:08 +00:00
parent 16dd7c128d
commit 651555cc54

View File

@ -612,6 +612,7 @@ init()
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_INET6;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_protocol = IPPROTO_UDP;
hints.ai_flags = AI_PASSIVE;
error = getaddrinfo(NULL, port, &hints, &res);
if (error) {
@ -667,6 +668,7 @@ init()
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_INET6;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_protocol = IPPROTO_UDP;
error = getaddrinfo(RIP6_DEST, port, &hints, &res);
if (error) {
fatal("%s", gai_strerror(error));