mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-06 03:55:07 -05:00
cmdmon: add refresh command
This command can be used to resolve the names of configured sources to IP addresses again.
This commit is contained in:
committed by
Miroslav Lichvar
parent
440c159217
commit
3eb43f4619
13
cmdmon.c
13
cmdmon.c
@@ -129,6 +129,7 @@ static const char permissions[] = {
|
||||
PERMIT_AUTH, /* MODIFY_MAKESTEP */
|
||||
PERMIT_OPEN, /* SMOOTHING */
|
||||
PERMIT_AUTH, /* SMOOTHTIME */
|
||||
PERMIT_AUTH, /* REFRESH */
|
||||
};
|
||||
|
||||
/* ================================================== */
|
||||
@@ -1140,6 +1141,14 @@ handle_reselect(CMD_Request *rx_message, CMD_Reply *tx_message)
|
||||
SRC_ReselectSource();
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
static void
|
||||
handle_refresh(CMD_Request *rx_message, CMD_Reply *tx_message)
|
||||
{
|
||||
NSR_RefreshAddresses();
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
/* Read a packet and process it */
|
||||
|
||||
@@ -1534,6 +1543,10 @@ read_from_cmd_socket(void *anything)
|
||||
handle_modify_polltarget(&rx_message, &tx_message);
|
||||
break;
|
||||
|
||||
case REQ_REFRESH:
|
||||
handle_refresh(&rx_message, &tx_message);
|
||||
break;
|
||||
|
||||
default:
|
||||
assert(0);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user