explicitly specify IPPROTO_UDP when calling getaddrinfo().

Obtained from:	KAME
MFC after:	1 week
This commit is contained in:
ume 2003-08-18 15:54:08 +00:00
parent ba2bc5b908
commit 55adf4bf8c

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));