]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: don't try to bind acquire socket if port is equal to ntp port
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 25 Mar 2014 10:51:40 +0000 (11:51 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 25 Mar 2014 14:24:38 +0000 (15:24 +0100)
acquire.c

index 29003e73634b418db2989069b939c55b169bab1f..599e7027d45967f23df5d5dc4f0b0fe66b609bf3 100644 (file)
--- a/acquire.c
+++ b/acquire.c
@@ -171,7 +171,7 @@ prepare_socket(int family)
   /* Close on exec */
   UTI_FdSetCloexec(sock_fd);
 
-  if (port_number == 0) {
+  if (port_number == 0 || port_number == CNF_GetNTPPort()) {
     /* Don't bother binding this socket - we're not fussed what port
        number it gets */
   } else {