summaryrefslogtreecommitdiffstats
path: root/contrib/ntp
diff options
context:
space:
mode:
authorjedgar <jedgar@FreeBSD.org>2001-04-06 14:34:15 +0000
committerjedgar <jedgar@FreeBSD.org>2001-04-06 14:34:15 +0000
commite90c8b37cfcce6a9546e2bf197a7ac8c4cef0e58 (patch)
tree2e34cfc934fc3aaacca3cefc173471650fc152a0 /contrib/ntp
parent10d702b26e4a5c5eddf729e881c7d239a9171cdf (diff)
downloadFreeBSD-src-e90c8b37cfcce6a9546e2bf197a7ac8c4cef0e58.zip
FreeBSD-src-e90c8b37cfcce6a9546e2bf197a7ac8c4cef0e58.tar.gz
Do not log every potential exploit attempt since a denial-of-service
may result.
Diffstat (limited to 'contrib/ntp')
-rw-r--r--contrib/ntp/ntpd/ntp_control.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/contrib/ntp/ntpd/ntp_control.c b/contrib/ntp/ntpd/ntp_control.c
index e8ae30b..f8371a1 100644
--- a/contrib/ntp/ntpd/ntp_control.c
+++ b/contrib/ntp/ntpd/ntp_control.c
@@ -1656,17 +1656,8 @@ ctl_getitem(
cp++;
while (cp < reqend && *cp != ',') {
*tp++ = *cp++;
- if (tp >= buf + sizeof(buf)) {
- msyslog(LOG_WARNING, "Attempted \"ntpdx\" exploit from IP %d.%d.%d.%d:%d (possibly spoofed)\n",
- (ntohl(rmt_addr->sin_addr.s_addr) >> 24) & 0xff,
- (ntohl(rmt_addr->sin_addr.s_addr) >> 16) & 0xff,
- (ntohl(rmt_addr->sin_addr.s_addr) >> 8) & 0xff,
- (ntohl(rmt_addr->sin_addr.s_addr) >> 0) & 0xff,
- ntohs(rmt_addr->sin_port)
-);
-
+ if (tp >= buf + sizeof(buf))
return (0);
- }
}
if (cp < reqend)
cp++;
OpenPOWER on IntegriCloud