From 7601d4c00fdf5401cebc9864a8298b0ee3260030 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Wed, 13 Oct 2004 12:37:48 +0000 Subject: fall cleaning --- usr.sbin/ntpd/ntp_msg.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/ntpd/ntp_msg.c b/usr.sbin/ntpd/ntp_msg.c index 31312838c95..bd525fd21a4 100644 --- a/usr.sbin/ntpd/ntp_msg.c +++ b/usr.sbin/ntpd/ntp_msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntp_msg.c,v 1.7 2004/09/24 14:51:16 henning Exp $ */ +/* $OpenBSD: ntp_msg.c,v 1.8 2004/10/13 12:37:47 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -29,13 +29,7 @@ int ntp_getmsg(char *p, ssize_t len, struct ntp_msg *msg) { - int auth, i; - - if (len == NTP_MSGSIZE) - auth = 1; - else if (len == NTP_MSGSIZE_NOAUTH) - auth = 0; - else { + if (len != NTP_MSGSIZE_NOAUTH && len != NTP_MSGSIZE) { log_warnx("malformed packet received"); return (-1); } @@ -75,17 +69,6 @@ ntp_getmsg(char *p, ssize_t len, struct ntp_msg *msg) memcpy(&msg->xmttime.fraction, p, sizeof(msg->xmttime.fraction)); p += sizeof(msg->xmttime.fraction); - if (auth) { - memcpy(&msg->keyid, p, sizeof(msg->keyid)); - p += sizeof(msg->keyid); - for (i = 0; i < NTP_DIGESTSIZE; i++) { - memcpy(&msg->digest[i], p, sizeof(msg->digest[i])); - p += sizeof(msg->digest[i]); - } - - /* XXX check auth */ - } - return (0); } @@ -133,10 +116,6 @@ ntp_sendmsg(int fd, struct sockaddr *sa, struct ntp_msg *msg, ssize_t len, memcpy(p, &msg->xmttime.fraction, sizeof(msg->xmttime.fraction)); p += sizeof(msg->xmttime.fraction); - if (auth) { - /* XXX */ - } - if (sa != NULL) sa_len = SA_LEN(sa); else -- cgit v1.2.3