ntp: fix log message for replaced source

When a source was replaced and the new source had the same slot as the
old source, a wrong message was logged. Fix the condition to distinguish
correctly between changed address and port.

Fixes: 9468fd4aa6 ("ntp: allow changing port of source")
This commit is contained in:
Miroslav Lichvar 2020-03-26 11:51:17 +01:00
parent c687224a11
commit a608496faf

View file

@ -381,7 +381,7 @@ change_source_address(NTP_Remote_Address *old_addr, NTP_Remote_Address *new_addr
name = record->name;
severity = UTI_IsIPReal(&old_addr->ip_addr) ? LOGS_INFO : LOGS_DEBUG;
if (slot1 != slot2) {
if (found == 0) {
/* The hash table must be rebuilt for the changed address */
rehash_records();