]> git.ipfire.org Git - thirdparty/chrony.git/commit
ntp: set interface index in IP*_PKTINFO when responding
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 29 Aug 2018 08:56:14 +0000 (10:56 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 30 Aug 2018 09:56:13 +0000 (11:56 +0200)
commit5fc7674e366fa1bfda162bdaba57243cff0a55a7
treee16d98df6cb08d968e7b3580ec210dd07504ca75
parent018977044ad796ba5c2712fb9298f9ace96739c3
ntp: set interface index in IP*_PKTINFO when responding

When a server with multiple interfaces in the same network is sending a
response, setting the ipi_spec_dst/ipi6_addr field of the IP*_PKTINFO
control message selects the source address, but not necessarily the
interface. The packet has the expected source address, but it may be
sent by an interface that doesn't have the address.

Set the ipi_ifindex/ipi6_ifindex field to respond on the same interface
as the request was received from to avoid asymmetries in delay and
timestamping.
ntp_io.c