summaryrefslogtreecommitdiffstats
path: root/libntp/lib_strbuf.c
diff options
context:
space:
mode:
authorroberto <roberto@FreeBSD.org>2013-12-04 21:33:17 +0000
committerroberto <roberto@FreeBSD.org>2013-12-04 21:33:17 +0000
commitd54cfbdce4a9878ef65216dea36b62cf6646b84b (patch)
treea618007bb41d13153794a598e3d904ace2976324 /libntp/lib_strbuf.c
parentfd23eea016bd30c806a3ee90eb6f397470c2fa46 (diff)
downloadFreeBSD-src-d54cfbdce4a9878ef65216dea36b62cf6646b84b.zip
FreeBSD-src-d54cfbdce4a9878ef65216dea36b62cf6646b84b.tar.gz
Virgin import of ntpd 4.2.6p5.
When the series of commits is complete, things like https://cert.litnet.lt/en/docs/ntp-distributed-reflection-dos-attacks should be fixed. PR: bin/148836 (except that we import a newer version) Asked by: Too many MFC after: 2 weeks
Diffstat (limited to 'libntp/lib_strbuf.c')
-rw-r--r--libntp/lib_strbuf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libntp/lib_strbuf.c b/libntp/lib_strbuf.c
index 315070f..e0becbc 100644
--- a/libntp/lib_strbuf.c
+++ b/libntp/lib_strbuf.c
@@ -1,7 +1,12 @@
/*
* lib_strbuf - library string storage
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <isc/net.h>
+#include <isc/result.h>
#include "ntp_stdlib.h"
#include "lib_strbuf.h"
@@ -10,6 +15,8 @@
*/
char lib_stringbuf[LIB_NUMBUFS][LIB_BUFLENGTH];
int lib_nextbuf;
+int ipv4_works;
+int ipv6_works;
int lib_inited = 0;
/*
@@ -19,5 +26,7 @@ void
init_lib(void)
{
lib_nextbuf = 0;
+ ipv4_works = (ISC_R_SUCCESS == isc_net_probeipv4());
+ ipv6_works = (ISC_R_SUCCESS == isc_net_probeipv6());
lib_inited = 1;
}
OpenPOWER on IntegriCloud