mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
socket: add support for selecting interface again
Revert commit e49aececce ("socket: don't set interface for sent
packets") to allow the interface to be selected for outgoing packets,
but don't set it in the callers yet.
This commit is contained in:
4
ntp_io.c
4
ntp_io.c
@@ -452,9 +452,11 @@ NIO_SendPacket(NTP_Packet *packet, NTP_Remote_Address *remote_addr,
|
||||
message.remote_addr.ip.port = remote_addr->port;
|
||||
}
|
||||
|
||||
message.if_index = local_addr->if_index;
|
||||
message.local_addr.ip = local_addr->ip_addr;
|
||||
|
||||
/* Don't require the response to use the same interface */
|
||||
message.if_index = INVALID_IF_INDEX;
|
||||
|
||||
#if !defined(HAVE_IN_PKTINFO) && defined(IP_SENDSRCADDR)
|
||||
/* On FreeBSD a local IPv4 address cannot be specified on bound socket */
|
||||
if (message.local_addr.ip.family == IPADDR_INET4 &&
|
||||
|
||||
Reference in New Issue
Block a user