From: Brian Utterback Date: Sun, 14 Sep 2008 22:11:27 +0000 (-0400) Subject: ntpd.c, ChangeLog: X-Git-Tag: NTP_4_2_5P132~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3aeac74cac1d8f39bd931b47c02757c7c71b4c40;p=thirdparty%2Fntp.git ntpd.c, ChangeLog: Multicast DNS service registration must come after the fork on Solaris. bk: 48cd8c0fyK7vz5wOsWBzHtCTDTbTuw --- diff --git a/ChangeLog b/ChangeLog index 8bce007bb..67b163027 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* [Bug 1067] Multicast DNS service registration must come after the fork on Solaris. * [Bug 1066] Error messages should log as errors (4.2.5p131) 2008/09/14 Released by Harlan Stenn * [Bug 1065] Re-enable support for the timingstats file. diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c index 480eaa57a..1d6f19f97 100644 --- a/ntpd/ntpd.c +++ b/ntpd/ntpd.c @@ -581,14 +581,6 @@ ntpdmain( ntp_srandom((int)(now.l_i * now.l_uf)); -#ifdef HAVE_DNSREGISTRATION - /* HMS: does this have to happen this early? */ - msyslog(LOG_INFO, "Attemping to register mDNS"); - if ( DNSServiceRegister (&mdns, 0, 0, NULL, "_ntp._udp", NULL, NULL, htons(NTP_PORT), 0, NULL, NULL, NULL) != kDNSServiceErr_NoError ) { - msyslog(LOG_ERR, "Unable to register mDNS"); - } -#endif - #if !defined(VMS) # ifndef NODETACH /* @@ -863,6 +855,14 @@ ntpdmain( loop_config(LOOP_DRIFTCOMP, old_drift); initializing = 0; +#ifdef HAVE_DNSREGISTRATION + /* HMS: does this have to happen this early? */ + msyslog(LOG_INFO, "Attemping to register mDNS"); + if ( DNSServiceRegister (&mdns, 0, 0, NULL, "_ntp._udp", NULL, NULL, htons(NTP_PORT), 0, NULL, NULL, NULL) != kDNSServiceErr_NoError ) { + msyslog(LOG_ERR, "Unable to register mDNS"); + } +#endif + #ifdef HAVE_DROPROOT if( droproot ) { /* Drop super-user privileges and chroot now if the OS supports this */