From: Miroslav Lichvar Date: Mon, 5 Oct 2020 07:58:31 +0000 (+0200) Subject: cmdmon: fix link-local address check X-Git-Tag: 4.0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d60d611ae63590cfafd6aa0e0501a24171f396c;p=thirdparty%2Fchrony.git cmdmon: fix link-local address check Don't check for a link-local address on path of a Unix domain socket. Fixes: 4e747da4b482 ("ntp+cmdmon: fix responding to link-local addresses") --- diff --git a/cmdmon.c b/cmdmon.c index a7a6a58f..c17db0cb 100644 --- a/cmdmon.c +++ b/cmdmon.c @@ -306,7 +306,8 @@ transmit_reply(int sock_fd, int request_length, SCK_Message *message) /* Don't require responses to non-link-local addresses to use the same interface */ - if (!SCK_IsLinkLocalIPAddress(&message->remote_addr.ip.ip_addr)) + if (message->addr_type == SCK_ADDR_IP && + !SCK_IsLinkLocalIPAddress(&message->remote_addr.ip.ip_addr)) message->if_index = INVALID_IF_INDEX; if (!SCK_SendMessage(sock_fd, message, 0))