Browse Source

Limit the number of addresses used by the 'servers' directive to 8; ok henning@

OPENBSD_3_7
dtucker 19 years ago
parent
commit
a5982aae18
2 changed files with 5 additions and 3 deletions
  1. +2
    -2
      src/usr.sbin/ntpd/config.c
  2. +3
    -1
      src/usr.sbin/ntpd/ntpd.h

+ 2
- 2
src/usr.sbin/ntpd/config.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: config.c,v 1.14 2004/08/30 12:02:59 henning Exp $ */
/* $OpenBSD: config.c,v 1.15 2004/12/16 00:38:59 dtucker Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -133,7 +133,7 @@ host_dns(const char *s, struct ntp_addr **hn)
return (-1);
}
for (res = res0; res; res = res->ai_next) {
for (res = res0; res && cnt < MAX_SERVERS_DNS; res = res->ai_next) {
if (res->ai_family != AF_INET &&
res->ai_family != AF_INET6)
continue;


+ 3
- 1
src/usr.sbin/ntpd/ntpd.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: ntpd.h,v 1.47 2004/12/09 20:24:46 mickey Exp $ */
/* $OpenBSD: ntpd.h,v 1.48 2004/12/16 00:38:59 dtucker Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -47,6 +47,8 @@
#define TRUSTLEVEL_AGRESSIVE 8
#define TRUSTLEVEL_MAX 10
#define MAX_SERVERS_DNS 8
#define QSCALE_OFF_MIN 0.05
#define QSCALE_OFF_MAX 0.50


Loading…
Cancel
Save