]> git.ipfire.org Git - thirdparty/chrony.git/commit
ntp: don't use IP_SENDSRCADDR on bound socket
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 3 Dec 2018 14:51:54 +0000 (15:51 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 3 Dec 2018 15:08:08 +0000 (16:08 +0100)
commit6af39d63aa9323b4b8c39efe24ae0c88c949a901
tree0fffff315e053ebd82191e5d6caf3b764ee60dd8
parentcc8414b1b3909f4fc484d8eb4cae48f7f1c0309a
ntp: don't use IP_SENDSRCADDR on bound socket

On FreeBSD, sendmsg() fails when IP_SENDSRCADDR specifies a source
address on a socket that is bound to the address. This prevents a server
configured with the bindaddress directive from responding to clients.

Add a new variable to check whether the server IPv4 socket is not bound
before setting the source address.
ntp_io.c