diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-03-31 20:07:57 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-03-31 20:07:57 +0000 |
commit | 0a70c1e7b2a4d42dddd8ef0d822c0516700fc107 (patch) | |
tree | aef20558010d3c5d02a241b046d41474c6548323 /usr.sbin/rwhod/rwhod.c | |
parent | 944fa9c0229522c7b79fd97638efc2346a0bf12b (diff) |
Log on short packets before discard'em; millert@ ok.
Diffstat (limited to 'usr.sbin/rwhod/rwhod.c')
-rw-r--r-- | usr.sbin/rwhod/rwhod.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c index 24af776cfed..11a1ed94f78 100644 --- a/usr.sbin/rwhod/rwhod.c +++ b/usr.sbin/rwhod/rwhod.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "@(#)rwhod.c 8.1 (Berkeley) 6/6/93";*/ -static char rcsid[] = "$OpenBSD: rwhod.c,v 1.16 2001/02/08 15:03:20 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: rwhod.c,v 1.17 2001/03/31 20:07:56 fgsch Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -255,8 +255,11 @@ handleread(s) ntohs(from.sin_port), inet_ntoa(from.sin_addr)); return; } - if (cc < WHDRSIZE) + if (cc < WHDRSIZE) { + syslog(LOG_WARNING, "short packet from %s", + inet_ntoa(from.sin_addr)); return; + } if (wd.wd_vers != WHODVERSION) return; if (wd.wd_type != WHODTYPE_STATUS) |