From: Harlan Stenn Date: Thu, 15 May 2008 06:03:40 +0000 (-0400) Subject: [Bug 1022] Fix compilation problems with yesterday's commit X-Git-Tag: NTP_4_2_5P115~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91fb1d320a61d74aa61c1e09b25b2c39e614e4d9;p=thirdparty%2Fntp.git [Bug 1022] Fix compilation problems with yesterday's commit bk: 482bd23cE0uehaWTlVjFZ-rJ08tPuw --- diff --git a/ChangeLog b/ChangeLog index 9d8b985c5..daa15f01b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* [Bug 1022] Fix compilation problems with yesterday's commit. * Updates and cleanup from Dave Mills: I've now spent eleven months of a sabbatical year - 7 days a week, 6-10 hours most days - working on NTP. I have carefully reviewed every major diff --git a/include/ntp.h b/include/ntp.h index e964be508..7e24ef13b 100644 --- a/include/ntp.h +++ b/include/ntp.h @@ -434,8 +434,8 @@ struct peer { #define FLAG_IBURST 0x0100 /* initial burst mode */ #define FLAG_NOSELECT 0x0200 /* never select */ #define FLAG_TRUE 0x0400 /* force truechimer */ -#ifdef OPENSSL #define FLAG_SKEY 0x1000 /* autokey authentication */ +#ifdef OPENSSL #define FLAG_ASSOC 0x2000 /* autokey request */ #endif /* OPENSSL */ diff --git a/ntpd/ntp_intres.c b/ntpd/ntp_intres.c index 01dbf2746..d2c1246b5 100644 --- a/ntpd/ntp_intres.c +++ b/ntpd/ntp_intres.c @@ -1030,6 +1030,7 @@ readconf( } } +#if 0 /* paranoid checking - these are done in newpeer() */ if (intval[TOK_HMODE] != MODE_ACTIVE && intval[TOK_HMODE] != MODE_CLIENT && intval[TOK_HMODE] != MODE_BROADCAST) { @@ -1065,6 +1066,7 @@ readconf( intval[TOK_FLAGS], name); resolver_exit(1); } +#endif /* end paranoid checking */ flags = 0; if (intval[TOK_FLAGS] & FLAG_PREFER) @@ -1075,8 +1077,11 @@ readconf( flags |= CONF_FLAG_BURST; if (intval[TOK_FLAGS] & FLAG_IBURST) flags |= CONF_FLAG_IBURST; + +#ifdef OPENSSL if (intval[TOK_FLAGS] & FLAG_SKEY) flags |= CONF_FLAG_SKEY; +#endif /* OPENSSL */ /* * This is as good as we can check it. Add it in. diff --git a/ntpd/ntp_peer.c b/ntpd/ntp_peer.c index c1121dc47..397be7a78 100644 --- a/ntpd/ntp_peer.c +++ b/ntpd/ntp_peer.c @@ -838,8 +838,10 @@ newpeer( if (cast_flags & MDF_MCAST && peer->dstadr) { enable_multicast_if(peer->dstadr, srcadr); } +#ifdef OPENSSL if (key > NTP_MAXKEY) peer->flags |= FLAG_SKEY; +#endif /* OPENSSL */ peer->cast_flags = cast_flags; peer->ttl = (u_char)ttl; peer->keyid = key; diff --git a/ntpd/ntp_request.c b/ntpd/ntp_request.c index e19ebcefe..5cd4a2c49 100644 --- a/ntpd/ntp_request.c +++ b/ntpd/ntp_request.c @@ -1338,6 +1338,8 @@ do_conf( cp = (struct conf_peer *)inpkt->data; memset(&temp_cp, 0, sizeof(struct conf_peer)); memcpy(&temp_cp, (char *)cp, INFO_ITEMSIZE(inpkt->mbz_itemsize)); + +#if 0 /* paranoid checking - these are done in newpeer() */ fl = 0; while (items-- > 0 && !fl) { if (((temp_cp.version) > NTP_VERSION) @@ -1358,6 +1360,7 @@ do_conf( req_ack(srcadr, inter, inpkt, INFO_ERR_FMT); return; } +#endif /* end paranoid checking */ /* * Looks okay, try it out @@ -1377,9 +1380,10 @@ do_conf( fl |= FLAG_BURST; if (temp_cp.flags & CONF_FLAG_IBURST) fl |= FLAG_IBURST; +#ifdef OPENSSL if (temp_cp.flags & CONF_FLAG_SKEY) fl |= FLAG_SKEY; - +#endif /* OPENSSL */ if (client_v6_capable && temp_cp.v6_flag != 0) { peeraddr.ss_family = AF_INET6; GET_INADDR6(peeraddr) = temp_cp.peeraddr6; diff --git a/ntpd/refclock_acts.c b/ntpd/refclock_acts.c index 466415fbd..d463ea21c 100644 --- a/ntpd/refclock_acts.c +++ b/ntpd/refclock_acts.c @@ -364,8 +364,8 @@ acts_message( * message. */ pp = peer->procptr; up = (struct actsunit *)pp->unitptr; - ioctl(pp->io.fd, TIOCMGET, (char *)&modem); #ifdef DEBUG + ioctl(pp->io.fd, TIOCMGET, (char *)&modem); snprintf(tbuf, sizeof(tbuf), "acts: %04x (%d %d) %d %s", modem, up->state, up->timer, strlen(pp->a_lastcode), pp->a_lastcode);