From: Danny Mayer Date: Thu, 5 Aug 2004 04:14:18 +0000 (-0400) Subject: Look for PPP for interface to the outside X-Git-Tag: NTP_4_2_3~140 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca073debbe3a17aec1020e116f23c2823eefe08f;p=thirdparty%2Fntp.git Look for PPP for interface to the outside bk: 4111b41a7rWb5Nty9uxEELGBZrkROg --- diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c index 4e9c37fb93..974f3926ea 100644 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@ -2052,6 +2052,24 @@ findinterface( } } + /* + * If we got here and failed because it was not a local network + * address, see if we have a PPP interface and use that + */ + for (i = nwilds; i < ninterfaces; i++) + { + if (addr->ss_family == AF_INET) + if (((struct sockaddr_in *)&inter_list[i].sin)->sin_family == AF_INET && + inter_list[i].flags & INT_PPP) + return (&inter_list[i]); + else if (addr->ss_family == AF_INET6) + if (((struct sockaddr_in6 *)&inter_list[i].sin)->sin6_family == AF_INET6 && + inter_list[i].flags & INT_PPP) + return (&inter_list[i]); + + } + + saddrlen = SOCKLEN(addr); ind = find_addr_in_list(addr); if (ind >= 0)