mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 20:45:07 -05:00
ntp: change NSR_RemoveSource() to accept IP address only
Change the function to accept IP address alone to make it clear that the port is ignored.
This commit is contained in:
7
cmdmon.c
7
cmdmon.c
@@ -782,13 +782,12 @@ handle_add_source(CMD_Request *rx_message, CMD_Reply *tx_message)
|
||||
static void
|
||||
handle_del_source(CMD_Request *rx_message, CMD_Reply *tx_message)
|
||||
{
|
||||
NTP_Remote_Address rem_addr;
|
||||
NSR_Status status;
|
||||
IPAddr ip_addr;
|
||||
|
||||
UTI_IPNetworkToHost(&rx_message->data.del_source.ip_addr, &rem_addr.ip_addr);
|
||||
rem_addr.port = 0;
|
||||
UTI_IPNetworkToHost(&rx_message->data.del_source.ip_addr, &ip_addr);
|
||||
|
||||
status = NSR_RemoveSource(&rem_addr);
|
||||
status = NSR_RemoveSource(&ip_addr);
|
||||
switch (status) {
|
||||
case NSR_Success:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user