diff options
author | Christian Weisgerber <naddy@FreeBSD.org> | 2016-04-02 16:04:34 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@FreeBSD.org> | 2016-04-02 16:04:34 +0000 |
commit | 2728a66081e1f584e73b305239b1e5796ac3deff (patch) | |
tree | f56319ff72613b1128162a1b97e8691c9f17a10b /net/openntpd/files/patch-src_server.c | |
parent | During the exp-run in bug 208158, it was found that www/node gives (diff) |
Update to 5.9p1. Notable changes:
* The rtable option was removed from server and servers. Users of
"server * rtable X" will need to switch to launching ntpd with
# setfib -F X /usr/sbin/ntpd
* Various improvements to the HTTPS constraint feature (requires
LibreSSL).
This port reenables rtable support in the listen option on FreeBSD.
Relnotes: http://www.openntpd.org/txt/release-5.9p1.txt
Diffstat (limited to 'net/openntpd/files/patch-src_server.c')
-rw-r--r-- | net/openntpd/files/patch-src_server.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/net/openntpd/files/patch-src_server.c b/net/openntpd/files/patch-src_server.c new file mode 100644 index 000000000000..52e37f601d9f --- /dev/null +++ b/net/openntpd/files/patch-src_server.c @@ -0,0 +1,47 @@ +--- src/server.c.orig 2016-03-28 13:51:51 UTC ++++ src/server.c +@@ -36,14 +36,14 @@ setup_listeners(struct servent *se, stru + struct ifaddrs *ifa, *ifap; + struct sockaddr *sa; + #ifdef SO_RTABLE +- struct if_data *ifd; ++ struct ifreq ifr; + #endif + u_int8_t *a6; + size_t sa6len = sizeof(struct in6_addr); + u_int new_cnt = 0; + int tos = IPTOS_LOWDELAY; + #ifdef SO_RTABLE +- int rdomain = 0; ++ int rdomain, fd; + #endif + + TAILQ_FOREACH(lap, &lconf->listen_addrs, entry) { +@@ -56,16 +56,21 @@ setup_listeners(struct servent *se, stru + sa = ifap->ifa_addr; + if (sa == NULL || SA_LEN(sa) == 0) + continue; +-#ifdef SO_RTABLE +- if (sa->sa_family == AF_LINK) { +- ifd = ifap->ifa_data; +- rdomain = ifd->ifi_rdomain; +- } +-#endif + if (sa->sa_family != AF_INET && + sa->sa_family != AF_INET6) + continue; + #ifdef SO_RTABLE ++ strlcpy(ifr.ifr_name, ifap->ifa_name, ++ sizeof(ifr.ifr_name)); ++ ++ fd = socket(AF_INET, SOCK_DGRAM, 0); ++ if (ioctl(fd, SIOCGIFRDOMAIN, ++ (caddr_t)&ifr) == -1) ++ rdomain = 0; ++ else ++ rdomain = ifr.ifr_rdomainid; ++ close(fd); ++ + if (lap->rtable != -1 && rdomain != lap->rtable) + continue; + #endif |