git: fb3355170bbe - 2025Q1 - net/ntp: Another patch to address IPv6 pool regression

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Wed, 19 Feb 2025 04:34:04 UTC
The branch 2025Q1 has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fb3355170bbed15e0b8996ac63382d80793c934c

commit fb3355170bbed15e0b8996ac63382d80793c934c
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2025-02-19 03:49:50 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2025-02-19 03:58:47 +0000

    net/ntp: Another patch to address IPv6 pool regression
    
    43537eb9c3e5 circumvented an upstream patch which caused an IPv6
    pool regression. This patch, discussed in
    https://bugs.ntp.org/show_bug.cgi?id=3958, addresses another
    unworkable combination of link-local local address with
    non-link-local server.
    
    Obtained from:  src c1767cf87cb6
    
    (cherry picked from commit c6ccd7ce6e64d7b036ad89d23b9a1ffc78740cb6)
---
 net/ntp/Makefile                      |  2 +-
 net/ntp/files/patch-ntpd_ntp__proto.c | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/net/ntp/Makefile b/net/ntp/Makefile
index 7b8937e5d1ad..2de4909c1769 100644
--- a/net/ntp/Makefile
+++ b/net/ntp/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	ntp
 PORTVERSION=	4.2.8p18
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	net
 MASTER_SITES=	http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ \
 		http://archive.ntp.org/ntp4/ntp-4.2/
diff --git a/net/ntp/files/patch-ntpd_ntp__proto.c b/net/ntp/files/patch-ntpd_ntp__proto.c
new file mode 100644
index 000000000000..76d9a7bf0583
--- /dev/null
+++ b/net/ntp/files/patch-ntpd_ntp__proto.c
@@ -0,0 +1,11 @@
+--- ntpd/ntp_proto.c.orig	2024-05-07 04:21:28.000000000 -0700
++++ ntpd/ntp_proto.c	2025-02-18 19:48:02.135233000 -0800
+@@ -474,7 +474,7 @@
+ 	/* [Bug 3851] drop pool servers which can no longer be reached. */
+ 	if (MDF_PCLNT & peer->cast_flags) {
+ 		if (   (IS_IPV6(&peer->srcadr) && !nonlocal_v6_addr_up)
+-		    || !nonlocal_v4_addr_up) {
++		    || (IS_IPV4(&peer->srcadr) && !nonlocal_v4_addr_up)) {
+ 			unpeer(peer);
+ 			return;
+ 		}