diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-10-13 12:37:48 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-10-13 12:37:48 +0000 |
commit | 7601d4c00fdf5401cebc9864a8298b0ee3260030 (patch) | |
tree | 3ef81cb8bbc38b7f49563c7e54e8635662ed45a6 /usr.sbin | |
parent | 395a6c5650b3167080dfae83dec6dca056c9ae9c (diff) |
fall cleaning
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ntpd/ntp_msg.c | 25 |
1 files changed, 2 insertions, 23 deletions
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 <henning@openbsd.org> @@ -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 |