From b0fc5832f4bac39e879495a7e2f8c0268fb83cdb Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 9 Feb 2021 13:07:37 +0100 Subject: [PATCH] ntp: require port match in address update In NSR_UpdateSourceNtpAddress() and other updates of the address require that the old port matches the current source's port. --- ntp_sources.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntp_sources.c b/ntp_sources.c index 63e16de..537f651 100644 --- a/ntp_sources.c +++ b/ntp_sources.c @@ -370,7 +370,7 @@ change_source_address(NTP_Remote_Address *old_addr, NTP_Remote_Address *new_addr char *name; found = find_slot2(old_addr, &slot1); - if (found == 0) + if (found != 2) return NSR_NoSuchSource; /* Make sure there is no other source using the new address (with the same