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.
This commit is contained in:
Miroslav Lichvar 2021-02-09 13:07:37 +01:00
parent cf6af112e1
commit b0fc5832f4

View file

@ -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