diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2005-09-24 00:32:04 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2005-09-24 00:32:04 +0000 |
commit | efd68f6b797fecb5e8fed90cb478d27bdd9fee19 (patch) | |
tree | 1c647431cfd5436e9f6d5e715aa7b967060b0682 /usr.sbin/ntpd/ntp_msg.c | |
parent | c2852f2e169ac0a6678b9a237555ed5c4f546ac4 (diff) |
Log source address for 'malformed packet' errors. ok henning@
Diffstat (limited to 'usr.sbin/ntpd/ntp_msg.c')
-rw-r--r-- | usr.sbin/ntpd/ntp_msg.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ntpd/ntp_msg.c b/usr.sbin/ntpd/ntp_msg.c index 2471319481a..99554c92774 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.14 2004/12/14 06:27:13 dtucker Exp $ */ +/* $OpenBSD: ntp_msg.c,v 1.15 2005/09/24 00:32:03 dtucker Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -27,10 +27,11 @@ #include "ntp.h" int -ntp_getmsg(char *p, ssize_t len, struct ntp_msg *msg) +ntp_getmsg(struct sockaddr *sa, char *p, ssize_t len, struct ntp_msg *msg) { if (len != NTP_MSGSIZE_NOAUTH && len != NTP_MSGSIZE) { - log_warnx("malformed packet received"); + log_warnx("malformed packet received from %s", + log_sockaddr(sa)); return (-1); } |