git: a7aa1196d354 - stable/14 - ntp: ntpd does not connect to NTP server with link local IPv6 address

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Thu, 20 Mar 2025 04:27:01 UTC
The branch stable/14 has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=a7aa1196d3541178b5d43c015ec28e0200aa3467

commit a7aa1196d3541178b5d43c015ec28e0200aa3467
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2025-01-31 22:25:14 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2025-03-20 04:26:45 +0000

    ntp: ntpd does not connect to NTP server with link local IPv6 address
    
    Upstream bug 3943 (https://bugs.ntp.org/show_bug.cgi?id=3943) discusses:
    
    Starting with 4.2.8p18 ntp does not synchronize or even connect to the
    configured NTP server any more. ntp stays in .INIT. state indefinitely
    and checking the network traffic shows that ntp does not attempt to
    contact the NTP server.
    
    This is regression introduced by the fix for upstream bug 3913. This
    is a similar bug I reported upstream (ntp bug 3841).
    
    (cherry picked from commit 381956e267569031883a516e10446c29490ee41d)
---
 contrib/ntp/ntpd/ntp_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/ntp/ntpd/ntp_io.c b/contrib/ntp/ntpd/ntp_io.c
index 12a61ccb1d2c..69fae606f5c7 100644
--- a/contrib/ntp/ntpd/ntp_io.c
+++ b/contrib/ntp/ntpd/ntp_io.c
@@ -3205,7 +3205,7 @@ sendpkt(
 	}
 
 	do {
-		if (INT_LL_OF_GLOB & src->flags) {
+		if (ismcast && INT_LL_OF_GLOB & src->flags) {
 			/* avoid duplicate multicasts on same IPv6 net */
 			goto loop;
 		}