]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
'Minor
authorDanny Mayer <mayer@ntp.org>
Tue, 29 Jul 2003 19:10:37 +0000 (15:10 -0400)
committerDanny Mayer <mayer@ntp.org>
Tue, 29 Jul 2003 19:10:37 +0000 (15:10 -0400)
bk: 3f26c6adeGxeBj1EQFPt5ouT6Mvjgw

ntpd/ntp_config.c

index d05f91f3c71010d38f4e7d0d9647c867d3552e8f..0365cdaa204f24ad5f63104e87ffa83b24452944 100644 (file)
@@ -2070,13 +2070,14 @@ getnetnum(
 
        /* Get host address. Looking for UDP datagram connection */
        memset(&hints, 0, sizeof (hints));
+       hints.ai_socktype = SOCK_DGRAM;
        hints.ai_family = AF_UNSPEC;
 
 #ifdef DEBUG
                if (debug > 3)
                        printf("getaddrinfo %s\n", num);
 #endif
-       if (getaddrinfo(num, NULL, &hints, &ptr)!=0) {
+       if (getaddrinfo(num, "ntp", &hints, &ptr)!=0) {
                if (complain)
                        msyslog(LOG_ERR,
                                "getaddrinfo: \"%s\" invalid host address, line ignored",
@@ -2094,7 +2095,7 @@ getnetnum(
        }
 
        memcpy(addr, ptr->ai_addr, ptr->ai_addrlen);
-       addr->ss_family = ptr->ai_family;
+       addr->ss_family = (short) ptr->ai_family;
 #ifdef DEBUG
        if (debug > 1)
                printf("getnetnum given %s, got %s \n",