1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-13 03:03:15 +00:00

- Update to 2.4.2

This commit is contained in:
Ryan Steinmetz 2019-02-11 15:51:24 +00:00
parent 14223135a0
commit 37a40e4a4a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=492697
3 changed files with 4 additions and 49 deletions

View File

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= gdnsd
PORTVERSION= 2.4.1
PORTREVISION= 2
PORTVERSION= 2.4.2
CATEGORIES= dns
MASTER_SITES= https://github.com/gdnsd/gdnsd/releases/download/v${PORTVERSION}/ \
ZI \

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1547511962
SHA256 (gdnsd-2.4.1.tar.xz) = 843c9c6f8a935eff66620eb38ceadda93cae1f42877315e64ba58b199c4643b5
SIZE (gdnsd-2.4.1.tar.xz) = 639656
TIMESTAMP = 1549900121
SHA256 (gdnsd-2.4.2.tar.xz) = 76ca503cf96d5a26ba1fea82f6c31983542c497799c0ed659d53e51bec9643de
SIZE (gdnsd-2.4.2.tar.xz) = 640948

View File

@ -1,44 +0,0 @@
--- src/dnsio_udp.c.orig 2019-01-16 15:44:43 UTC
+++ src/dnsio_udp.c
@@ -296,13 +296,16 @@ static void mainloop(const int fd, void*
.iov_len = 0
};
struct msghdr msg_hdr;
- char cmsg_buf[cmsg_size];
- memset(cmsg_buf, 0, sizeof(cmsg_buf));
+ union {
+ char cbuf[CMSG_BUFSIZE];
+ struct cmsghdr align;
+ } cmsg_buf;
+ memset(cmsg_buf.cbuf, 0, sizeof(cmsg_buf.cbuf));
memset(&msg_hdr, 0, sizeof(struct msghdr));
msg_hdr.msg_name = &asin.sa;
msg_hdr.msg_iov = &iov;
msg_hdr.msg_iovlen = 1;
- msg_hdr.msg_control = use_cmsg ? cmsg_buf : NULL;
+ msg_hdr.msg_control = use_cmsg ? cmsg_buf.cbuf : NULL;
#if GDNSD_B_QSBR
const struct timeval tmout_short = { .tv_sec = 0, .tv_usec = PRCU_DELAY_US };
@@ -341,6 +344,21 @@ static void mainloop(const int fd, void*
recvmsg_rv = recvmsg(fd, &msg_hdr, 0);
#endif
+#if defined __FreeBSD__ && defined IPV6_PKTINFO
+ if(asin.sa.sa_family == AF_INET6) {
+ struct cmsghdr* cmsg;
+ for(cmsg = (struct cmsghdr *)CMSG_FIRSTHDR(&msg_hdr); cmsg;
+ cmsg = (struct cmsghdr *)CMSG_NXTHDR(&msg_hdr, cmsg)) {
+ if((cmsg->cmsg_level == IPPROTO_IPV6) && (cmsg->cmsg_type == IPV6_PKTINFO)) {
+ struct in6_pktinfo* pi = (void*)CMSG_DATA((struct cmsghdr*)cmsg_buf.cbuf);
+ if(!IN6_IS_ADDR_LINKLOCAL(&pi->ipi6_addr))
+ pi->ipi6_ifindex = 0;
+ continue;
+ }
+ }
+ }
+#endif
+
if(unlikely(
(asin.sa.sa_family == AF_INET && !asin.sin.sin_port)
|| (asin.sa.sa_family == AF_INET6 && !asin.sin6.sin6_port)