]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Look for PPP for interface to the outside
authorDanny Mayer <mayer@ntp.org>
Thu, 5 Aug 2004 04:14:18 +0000 (00:14 -0400)
committerDanny Mayer <mayer@ntp.org>
Thu, 5 Aug 2004 04:14:18 +0000 (00:14 -0400)
bk: 4111b41a7rWb5Nty9uxEELGBZrkROg

ntpd/ntp_io.c

index 4e9c37fb939ebf9ce549405a15a4d37d5ee96f4d..974f3926eae62487d6257195fbb4acfcfbff1631 100644 (file)
@@ -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)