summaryrefslogtreecommitdiff
path: root/lib/isc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/isc')
-rw-r--r--lib/isc/api2
-rw-r--r--lib/isc/buffer.c8
-rw-r--r--lib/isc/event.c8
-rw-r--r--lib/isc/heap.c8
-rw-r--r--lib/isc/hmacmd5.c8
-rw-r--r--lib/isc/include/isc/buffer.h8
-rw-r--r--lib/isc/include/isc/entropy.h8
-rw-r--r--lib/isc/include/isc/event.h8
-rw-r--r--lib/isc/include/isc/file.h8
-rw-r--r--lib/isc/include/isc/ipv6.h8
-rw-r--r--lib/isc/include/isc/lex.h8
-rw-r--r--lib/isc/include/isc/lib.h8
-rw-r--r--lib/isc/include/isc/list.h8
-rw-r--r--lib/isc/include/isc/log.h8
-rw-r--r--lib/isc/include/isc/mem.h8
-rw-r--r--lib/isc/include/isc/netaddr.h8
-rw-r--r--lib/isc/include/isc/netscope.h8
-rw-r--r--lib/isc/include/isc/parseint.h8
-rw-r--r--lib/isc/include/isc/platform.h.in11
-rw-r--r--lib/isc/include/isc/quota.h8
-rw-r--r--lib/isc/include/isc/ratelimiter.h8
-rw-r--r--lib/isc/include/isc/region.h8
-rw-r--r--lib/isc/include/isc/result.h8
-rw-r--r--lib/isc/include/isc/socket.h8
-rw-r--r--lib/isc/include/isc/string.h14
-rw-r--r--lib/isc/include/isc/timer.h8
-rw-r--r--lib/isc/include/isc/util.h8
-rw-r--r--lib/isc/include/isc/version.h8
-rw-r--r--lib/isc/inet_aton.c8
-rw-r--r--lib/isc/inet_ntop.c8
-rw-r--r--lib/isc/lfsr.c8
-rw-r--r--lib/isc/lib.c8
-rw-r--r--lib/isc/mem.c33
-rw-r--r--lib/isc/mutexblock.c8
-rw-r--r--lib/isc/netaddr.c8
-rw-r--r--lib/isc/netscope.c8
-rw-r--r--lib/isc/nls/msgcat.c8
-rw-r--r--lib/isc/nothreads/condition.c8
-rw-r--r--lib/isc/nothreads/mutex.c8
-rw-r--r--lib/isc/pthreads/condition.c8
-rw-r--r--lib/isc/pthreads/include/isc/mutex.h8
-rw-r--r--lib/isc/pthreads/mutex.c8
-rw-r--r--lib/isc/quota.c8
-rw-r--r--lib/isc/ratelimiter.c8
-rw-r--r--lib/isc/region.c8
-rw-r--r--lib/isc/result.c8
-rw-r--r--lib/isc/symtab.c8
-rw-r--r--lib/isc/taskpool.c8
-rw-r--r--lib/isc/timer.c51
-rw-r--r--lib/isc/timer_p.h8
-rw-r--r--lib/isc/unix/Makefile.in8
-rw-r--r--lib/isc/unix/app.c20
-rw-r--r--lib/isc/unix/dir.c8
-rw-r--r--lib/isc/unix/entropy.c7
-rw-r--r--lib/isc/unix/errno2result.c8
-rw-r--r--lib/isc/unix/file.c8
-rw-r--r--lib/isc/unix/ifiter_getifaddrs.c10
-rw-r--r--lib/isc/unix/ifiter_ioctl.c13
-rw-r--r--lib/isc/unix/include/isc/dir.h8
-rw-r--r--lib/isc/unix/include/isc/strerror.h8
-rw-r--r--lib/isc/unix/include/isc/time.h8
-rw-r--r--lib/isc/unix/keyboard.c8
-rw-r--r--lib/isc/unix/net.c29
-rw-r--r--lib/isc/unix/os.c8
-rw-r--r--lib/isc/unix/resource.c77
-rw-r--r--lib/isc/unix/socket.c99
-rw-r--r--lib/isc/unix/stdtime.c8
-rw-r--r--lib/isc/unix/strerror.c8
-rw-r--r--lib/isc/unix/syslog.c10
-rw-r--r--lib/isc/version.c8
70 files changed, 455 insertions, 377 deletions
diff --git a/lib/isc/api b/lib/isc/api
index b4d017358ad1e..f94ca40025eca 100644
--- a/lib/isc/api
+++ b/lib/isc/api
@@ -1,3 +1,3 @@
LIBINTERFACE = 12
-LIBREVISION = 1
+LIBREVISION = 3
LIBAGE = 1
diff --git a/lib/isc/buffer.c b/lib/isc/buffer.c
index 30ce529e500af..0cf6fc2c4bedc 100644
--- a/lib/isc/buffer.c
+++ b/lib/isc/buffer.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: buffer.c,v 1.36.12.2 2004/03/08 09:04:48 marka Exp $ */
+/* $Id: buffer.c,v 1.36.12.5 2007/08/28 07:19:15 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/event.c b/lib/isc/event.c
index f767870ee8053..adcf78fb26cf2 100644
--- a/lib/isc/event.c
+++ b/lib/isc/event.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: event.c,v 1.15.12.3 2004/03/08 09:04:48 marka Exp $ */
+/* $Id: event.c,v 1.15.12.6 2007/08/28 07:19:15 tbox Exp $ */
/*
* Principal Author: Bob Halley
diff --git a/lib/isc/heap.c b/lib/isc/heap.c
index fd67d7bd78975..05129ce17f614 100644
--- a/lib/isc/heap.c
+++ b/lib/isc/heap.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1997-2001 Internet Software Consortium.
+ * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1997-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: heap.c,v 1.28.12.4 2006/04/17 18:27:20 explorer Exp $ */
+/* $Id: heap.c,v 1.28.12.7 2007/08/28 07:19:15 tbox Exp $ */
/*! \file
* Heap implementation of priority queues adapted from the following:
diff --git a/lib/isc/hmacmd5.c b/lib/isc/hmacmd5.c
index 5166a98cf6ee8..8f96f3a5f6de1 100644
--- a/lib/isc/hmacmd5.c
+++ b/lib/isc/hmacmd5.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: hmacmd5.c,v 1.5.12.5 2006/02/26 23:49:48 marka Exp $ */
+/* $Id: hmacmd5.c,v 1.5.12.8 2007/08/28 07:19:15 tbox Exp $ */
/*
* This code implements the HMAC-MD5 keyed hash algorithm
diff --git a/lib/isc/include/isc/buffer.h b/lib/isc/include/isc/buffer.h
index 02b82bcbacc5d..4c156469f17f5 100644
--- a/lib/isc/include/isc/buffer.h
+++ b/lib/isc/include/isc/buffer.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: buffer.h,v 1.39.12.2 2004/03/08 09:04:51 marka Exp $ */
+/* $Id: buffer.h,v 1.39.12.5 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_BUFFER_H
#define ISC_BUFFER_H 1
diff --git a/lib/isc/include/isc/entropy.h b/lib/isc/include/isc/entropy.h
index 7200a127e62f2..67ba5091b77c5 100644
--- a/lib/isc/include/isc/entropy.h
+++ b/lib/isc/include/isc/entropy.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: entropy.h,v 1.23.2.1.10.1 2004/03/06 08:14:40 marka Exp $ */
+/* $Id: entropy.h,v 1.23.2.1.10.4 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_ENTROPY_H
#define ISC_ENTROPY_H 1
diff --git a/lib/isc/include/isc/event.h b/lib/isc/include/isc/event.h
index 58ef2c32849f0..705a401c4af9f 100644
--- a/lib/isc/include/isc/event.h
+++ b/lib/isc/include/isc/event.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: event.h,v 1.24.2.2.8.2 2004/04/15 02:10:41 marka Exp $ */
+/* $Id: event.h,v 1.24.2.2.8.5 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_EVENT_H
#define ISC_EVENT_H 1
diff --git a/lib/isc/include/isc/file.h b/lib/isc/include/isc/file.h
index 6de6c8a82f20b..a0be041d972d4 100644
--- a/lib/isc/include/isc/file.h
+++ b/lib/isc/include/isc/file.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: file.h,v 1.24.12.3 2004/03/08 09:04:51 marka Exp $ */
+/* $Id: file.h,v 1.24.12.6 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_FILE_H
#define ISC_FILE_H 1
diff --git a/lib/isc/include/isc/ipv6.h b/lib/isc/include/isc/ipv6.h
index 8b4b0eb31f6a1..353c2014a401b 100644
--- a/lib/isc/include/isc/ipv6.h
+++ b/lib/isc/include/isc/ipv6.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ipv6.h,v 1.17.12.4 2004/03/09 05:21:09 marka Exp $ */
+/* $Id: ipv6.h,v 1.17.12.7 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_IPV6_H
#define ISC_IPV6_H 1
diff --git a/lib/isc/include/isc/lex.h b/lib/isc/include/isc/lex.h
index 29bdb2fed7caa..60e342b21d720 100644
--- a/lib/isc/include/isc/lex.h
+++ b/lib/isc/include/isc/lex.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lex.h,v 1.26.2.2.8.3 2004/03/08 09:04:51 marka Exp $ */
+/* $Id: lex.h,v 1.26.2.2.8.6 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_LEX_H
#define ISC_LEX_H 1
diff --git a/lib/isc/include/isc/lib.h b/lib/isc/include/isc/lib.h
index 1ad449311fb20..cd15de43fbf0f 100644
--- a/lib/isc/include/isc/lib.h
+++ b/lib/isc/include/isc/lib.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lib.h,v 1.6.12.3 2004/03/08 09:04:51 marka Exp $ */
+/* $Id: lib.h,v 1.6.12.6 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_LIB_H
#define ISC_LIB_H 1
diff --git a/lib/isc/include/isc/list.h b/lib/isc/include/isc/list.h
index 5fe82e3fe51de..4c304a80c8b8c 100644
--- a/lib/isc/include/isc/list.h
+++ b/lib/isc/include/isc/list.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1997-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1997-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: list.h,v 1.18.2.2.8.3 2006/06/06 00:11:40 marka Exp $ */
+/* $Id: list.h,v 1.18.2.2.8.6 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_LIST_H
#define ISC_LIST_H 1
diff --git a/lib/isc/include/isc/log.h b/lib/isc/include/isc/log.h
index 97aeba0c2425a..f244df625088d 100644
--- a/lib/isc/include/isc/log.h
+++ b/lib/isc/include/isc/log.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: log.h,v 1.39.2.4.2.7 2004/04/10 04:31:40 marka Exp $ */
+/* $Id: log.h,v 1.39.2.4.2.10 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_LOG_H
#define ISC_LOG_H 1
diff --git a/lib/isc/include/isc/mem.h b/lib/isc/include/isc/mem.h
index 64559240808e4..bb94f5236b571 100644
--- a/lib/isc/include/isc/mem.h
+++ b/lib/isc/include/isc/mem.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1997-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1997-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mem.h,v 1.54.12.4 2004/10/11 05:55:51 marka Exp $ */
+/* $Id: mem.h,v 1.54.12.7 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_MEM_H
#define ISC_MEM_H 1
diff --git a/lib/isc/include/isc/netaddr.h b/lib/isc/include/isc/netaddr.h
index ad3328c47cdf8..38435300694e4 100644
--- a/lib/isc/include/isc/netaddr.h
+++ b/lib/isc/include/isc/netaddr.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: netaddr.h,v 1.18.12.9 2005/07/29 00:13:10 marka Exp $ */
+/* $Id: netaddr.h,v 1.18.12.12 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_NETADDR_H
#define ISC_NETADDR_H 1
diff --git a/lib/isc/include/isc/netscope.h b/lib/isc/include/isc/netscope.h
index 7cc0f182d7424..6aa0e12b5b74d 100644
--- a/lib/isc/include/isc/netscope.h
+++ b/lib/isc/include/isc/netscope.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2002, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: netscope.h,v 1.4.142.5 2004/03/08 09:04:52 marka Exp $ */
+/* $Id: netscope.h,v 1.4.142.8 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_NETSCOPE_H
#define ISC_NETSCOPE_H 1
diff --git a/lib/isc/include/isc/parseint.h b/lib/isc/include/isc/parseint.h
index c877131c94fe1..ab1ff24ce4eb6 100644
--- a/lib/isc/include/isc/parseint.h
+++ b/lib/isc/include/isc/parseint.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001, 2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2001-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: parseint.h,v 1.2.202.4 2004/03/08 09:04:52 marka Exp $ */
+/* $Id: parseint.h,v 1.2.202.7 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_PARSEINT_H
#define ISC_PARSEINT_H 1
diff --git a/lib/isc/include/isc/platform.h.in b/lib/isc/include/isc/platform.h.in
index 7a803d7dfb987..9c4edabb5facc 100644
--- a/lib/isc/include/isc/platform.h.in
+++ b/lib/isc/include/isc/platform.h.in
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: platform.h.in,v 1.24.2.1.10.11 2004/03/08 09:04:52 marka Exp $ */
+/* $Id: platform.h.in,v 1.24.2.1.10.13 2007/09/13 23:45:58 tbox Exp $ */
#ifndef ISC_PLATFORM_H
#define ISC_PLATFORM_H 1
@@ -24,6 +24,11 @@
***** Platform-dependent defines.
*****/
+/*
+ * Define if the platform has <strings.h>.
+ */
+@ISC_PLATFORM_HAVESTRINGSH@
+
/***
*** Network.
***/
diff --git a/lib/isc/include/isc/quota.h b/lib/isc/include/isc/quota.h
index 4044118747b35..c78993c2bfd45 100644
--- a/lib/isc/include/isc/quota.h
+++ b/lib/isc/include/isc/quota.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: quota.h,v 1.8.12.6 2005/08/11 15:00:08 marka Exp $ */
+/* $Id: quota.h,v 1.8.12.9 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_QUOTA_H
#define ISC_QUOTA_H 1
diff --git a/lib/isc/include/isc/ratelimiter.h b/lib/isc/include/isc/ratelimiter.h
index 2acab34b5ad9b..42614546d3cdf 100644
--- a/lib/isc/include/isc/ratelimiter.h
+++ b/lib/isc/include/isc/ratelimiter.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ratelimiter.h,v 1.13.14.3 2004/03/08 09:04:53 marka Exp $ */
+/* $Id: ratelimiter.h,v 1.13.14.6 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_RATELIMITER_H
#define ISC_RATELIMITER_H 1
diff --git a/lib/isc/include/isc/region.h b/lib/isc/include/isc/region.h
index 5622394aaf437..738f68fae671a 100644
--- a/lib/isc/include/isc/region.h
+++ b/lib/isc/include/isc/region.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: region.h,v 1.16.12.3 2004/03/08 09:04:53 marka Exp $ */
+/* $Id: region.h,v 1.16.12.6 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_REGION_H
#define ISC_REGION_H 1
diff --git a/lib/isc/include/isc/result.h b/lib/isc/include/isc/result.h
index 93f7cefbd658b..e45d88d40b93f 100644
--- a/lib/isc/include/isc/result.h
+++ b/lib/isc/include/isc/result.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2001, 2003 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: result.h,v 1.57.2.2.8.5 2004/05/15 03:46:13 jinmei Exp $ */
+/* $Id: result.h,v 1.57.2.2.8.8 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_RESULT_H
#define ISC_RESULT_H 1
diff --git a/lib/isc/include/isc/socket.h b/lib/isc/include/isc/socket.h
index 9dcadb213caff..324a61a19e460 100644
--- a/lib/isc/include/isc/socket.h
+++ b/lib/isc/include/isc/socket.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: socket.h,v 1.54.12.4 2004/03/08 09:04:53 marka Exp $ */
+/* $Id: socket.h,v 1.54.12.7 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_SOCKET_H
#define ISC_SOCKET_H 1
diff --git a/lib/isc/include/isc/string.h b/lib/isc/include/isc/string.h
index 4fbfe1909cb90..3e9146b530fb9 100644
--- a/lib/isc/include/isc/string.h
+++ b/lib/isc/include/isc/string.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,17 +15,21 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: string.h,v 1.9.164.3 2004/03/06 08:14:49 marka Exp $ */
+/* $Id: string.h,v 1.9.164.5 2007/09/13 23:45:58 tbox Exp $ */
#ifndef ISC_STRING_H
#define ISC_STRING_H 1
-#include <string.h>
-
#include <isc/int.h>
#include <isc/lang.h>
#include <isc/platform.h>
+#include <string.h>
+
+#ifdef ISC_PLATFORM_HAVESTRINGSH
+#include <strings.h>
+#endif
+
ISC_LANG_BEGINDECLS
isc_uint64_t
diff --git a/lib/isc/include/isc/timer.h b/lib/isc/include/isc/timer.h
index 439c943dad531..3e8d3d593524f 100644
--- a/lib/isc/include/isc/timer.h
+++ b/lib/isc/include/isc/timer.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: timer.h,v 1.28.12.6 2005/10/27 00:27:30 marka Exp $ */
+/* $Id: timer.h,v 1.28.12.9 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_TIMER_H
#define ISC_TIMER_H 1
diff --git a/lib/isc/include/isc/util.h b/lib/isc/include/isc/util.h
index c2798d6df0c79..f7614cfaff73c 100644
--- a/lib/isc/include/isc/util.h
+++ b/lib/isc/include/isc/util.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: util.h,v 1.21.12.5 2004/03/08 09:04:53 marka Exp $ */
+/* $Id: util.h,v 1.21.12.8 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_UTIL_H
#define ISC_UTIL_H 1
diff --git a/lib/isc/include/isc/version.h b/lib/isc/include/isc/version.h
index 3da836c3e8ddb..3e5270d541a92 100644
--- a/lib/isc/include/isc/version.h
+++ b/lib/isc/include/isc/version.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: version.h,v 1.2.220.3 2004/03/08 09:04:54 marka Exp $ */
+/* $Id: version.h,v 1.2.220.6 2007/08/28 07:19:15 tbox Exp $ */
#include <isc/platform.h>
diff --git a/lib/isc/inet_aton.c b/lib/isc/inet_aton.c
index 530b0103bab09..f82c9e8355a9e 100644
--- a/lib/isc/inet_aton.c
+++ b/lib/isc/inet_aton.c
@@ -1,8 +1,8 @@
/*
- * Portions Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Portions Copyright (C) 1996-2001 Internet Software Consortium.
+ * Portions Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (C) 1996-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -70,7 +70,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
-static char rcsid[] = "$Id: inet_aton.c,v 1.15.12.3 2004/03/08 09:04:49 marka Exp $";
+static char rcsid[] = "$Id: inet_aton.c,v 1.15.12.6 2007/08/28 07:19:15 tbox Exp $";
#endif /* LIBC_SCCS and not lint */
#include <config.h>
diff --git a/lib/isc/inet_ntop.c b/lib/isc/inet_ntop.c
index 6dadd736e9535..4877eef93d580 100644
--- a/lib/isc/inet_ntop.c
+++ b/lib/isc/inet_ntop.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1996-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1996-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -17,7 +17,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] =
- "$Id: inet_ntop.c,v 1.12.12.4 2004/08/28 06:25:21 marka Exp $";
+ "$Id: inet_ntop.c,v 1.12.12.7 2007/08/28 07:19:15 tbox Exp $";
#endif /* LIBC_SCCS and not lint */
#include <config.h>
diff --git a/lib/isc/lfsr.c b/lib/isc/lfsr.c
index 6d5b7ff82385f..4a30154c15f11 100644
--- a/lib/isc/lfsr.c
+++ b/lib/isc/lfsr.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lfsr.c,v 1.11.2.2.2.6 2005/10/14 01:38:50 marka Exp $ */
+/* $Id: lfsr.c,v 1.11.2.2.2.9 2007/08/28 07:19:15 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/lib.c b/lib/isc/lib.c
index fa30abf13a19f..be7d16e5ebec2 100644
--- a/lib/isc/lib.c
+++ b/lib/isc/lib.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lib.c,v 1.8.12.3 2004/03/08 09:04:49 marka Exp $ */
+/* $Id: lib.c,v 1.8.12.6 2007/08/28 07:19:15 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/mem.c b/lib/isc/mem.c
index f5069fb7dc176..8bfe967295c9b 100644
--- a/lib/isc/mem.c
+++ b/lib/isc/mem.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1997-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mem.c,v 1.98.2.7.2.7 2005/03/17 03:58:32 marka Exp $ */
+/* $Id: mem.c,v 1.98.2.7.2.12 2007/11/26 23:45:51 tbox Exp $ */
#include <config.h>
@@ -191,7 +191,7 @@ struct isc_mempool {
if ((isc_mem_debugging & (ISC_MEM_DEBUGTRACE | \
ISC_MEM_DEBUGRECORD)) != 0 && \
b != NULL) \
- add_trace_entry(a, b, c, d, e); \
+ add_trace_entry(a, b, c, d, e); \
} while (0)
#define DELETE_TRACE(a, b, c, d, e) delete_trace_entry(a, b, c, d, e)
@@ -313,7 +313,7 @@ delete_trace_entry(isc_mem_t *mctx, const void *ptr, unsigned int size,
static inline size_t
rmsize(size_t size) {
/*
- * round down to ALIGNMENT_SIZE
+ * round down to ALIGNMENT_SIZE
*/
return (size & (~(ALIGNMENT_SIZE - 1)));
}
@@ -859,7 +859,7 @@ destroy(isc_mem_t *ctx) {
dl != NULL;
dl = ISC_LIST_HEAD(ctx->debuglist[i])) {
ISC_LIST_UNLINK(ctx->debuglist[i],
- dl, link);
+ dl, link);
free(dl);
}
}
@@ -884,7 +884,8 @@ destroy(isc_mem_t *ctx) {
for (i = 0; i < ctx->basic_table_count; i++)
(ctx->memfree)(ctx->arg, ctx->basic_table[i]);
(ctx->memfree)(ctx->arg, ctx->freelists);
- (ctx->memfree)(ctx->arg, ctx->basic_table);
+ if (ctx->basic_table != NULL)
+ (ctx->memfree)(ctx->arg, ctx->basic_table);
#endif /* ISC_MEM_USE_INTERNAL_MALLOC */
ondest = ctx->ondestroy;
@@ -1105,7 +1106,7 @@ print_active(isc_mem_t *mctx, FILE *out) {
"memory allocations:\n"));
found = ISC_FALSE;
format = isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
- ISC_MSG_PTRFILELINE,
+ ISC_MSG_PTRFILELINE,
"\tptr %p size %u file %s line %u\n");
for (i = 0; i <= mctx->max_size; i++) {
dl = ISC_LIST_HEAD(mctx->debuglist[i]);
@@ -1354,19 +1355,30 @@ isc_mem_inuse(isc_mem_t *ctx) {
void
isc_mem_setwater(isc_mem_t *ctx, isc_mem_water_t water, void *water_arg,
- size_t hiwater, size_t lowater)
+ size_t hiwater, size_t lowater)
{
+ isc_boolean_t callwater = ISC_FALSE;
+ isc_mem_water_t oldwater;
+ void *oldwater_arg;
+
REQUIRE(VALID_CONTEXT(ctx));
REQUIRE(hiwater >= lowater);
LOCK(&ctx->lock);
+ oldwater = ctx->water;
+ oldwater_arg = ctx->water_arg;
if (water == NULL) {
+ callwater = ctx->hi_called;
ctx->water = NULL;
ctx->water_arg = NULL;
ctx->hi_water = 0;
ctx->lo_water = 0;
ctx->hi_called = ISC_FALSE;
} else {
+ if (ctx->hi_called &&
+ (ctx->water != water || ctx->water_arg != water_arg ||
+ ctx->inuse < lowater || lowater == 0U))
+ callwater = ISC_TRUE;
ctx->water = water;
ctx->water_arg = water_arg;
ctx->hi_water = hiwater;
@@ -1374,6 +1386,9 @@ isc_mem_setwater(isc_mem_t *ctx, isc_mem_water_t water, void *water_arg,
ctx->hi_called = ISC_FALSE;
}
UNLOCK(&ctx->lock);
+
+ if (callwater && oldwater != NULL)
+ (oldwater)(oldwater_arg, ISC_MEM_LOWATER);
}
/*
diff --git a/lib/isc/mutexblock.c b/lib/isc/mutexblock.c
index dc7c23d8689ee..dd8c725371108 100644
--- a/lib/isc/mutexblock.c
+++ b/lib/isc/mutexblock.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mutexblock.c,v 1.14.12.3 2004/03/08 09:04:49 marka Exp $ */
+/* $Id: mutexblock.c,v 1.14.12.6 2007/08/28 07:19:15 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/netaddr.c b/lib/isc/netaddr.c
index 712ad2c1341b3..f40f9c464bb49 100644
--- a/lib/isc/netaddr.c
+++ b/lib/isc/netaddr.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: netaddr.c,v 1.18.12.9 2004/05/15 03:46:12 jinmei Exp $ */
+/* $Id: netaddr.c,v 1.18.12.12 2007/08/28 07:19:15 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/netscope.c b/lib/isc/netscope.c
index 8df448399c5d1..262377ab1b41d 100644
--- a/lib/isc/netscope.c
+++ b/lib/isc/netscope.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2002, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -17,7 +17,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] =
- "$Id: netscope.c,v 1.5.142.9 2006/08/25 05:25:50 marka Exp $";
+ "$Id: netscope.c,v 1.5.142.12 2007/08/28 07:19:15 tbox Exp $";
#endif /* LIBC_SCCS and not lint */
#include <config.h>
diff --git a/lib/isc/nls/msgcat.c b/lib/isc/nls/msgcat.c
index 906e26e9070eb..9b86e7e0c6a6d 100644
--- a/lib/isc/nls/msgcat.c
+++ b/lib/isc/nls/msgcat.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: msgcat.c,v 1.10.12.6 2005/06/09 23:54:31 marka Exp $ */
+/* $Id: msgcat.c,v 1.10.12.9 2007/08/28 07:19:15 tbox Exp $ */
/*
* Principal Author: Bob Halley
diff --git a/lib/isc/nothreads/condition.c b/lib/isc/nothreads/condition.c
index 395d52f7d307d..13a785b77c830 100644
--- a/lib/isc/nothreads/condition.c
+++ b/lib/isc/nothreads/condition.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: condition.c,v 1.4.12.5 2006/08/25 05:25:50 marka Exp $ */
+/* $Id: condition.c,v 1.4.12.8 2007/08/28 07:19:16 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/nothreads/mutex.c b/lib/isc/nothreads/mutex.c
index a707947fe9b7f..00d8e7a346f1b 100644
--- a/lib/isc/nothreads/mutex.c
+++ b/lib/isc/nothreads/mutex.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mutex.c,v 1.4.12.5 2006/08/25 05:25:50 marka Exp $ */
+/* $Id: mutex.c,v 1.4.12.8 2007/08/28 07:19:16 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/pthreads/condition.c b/lib/isc/pthreads/condition.c
index 489980c1f5a92..8539a8004484b 100644
--- a/lib/isc/pthreads/condition.c
+++ b/lib/isc/pthreads/condition.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: condition.c,v 1.30.2.1.10.1 2004/03/06 08:14:53 marka Exp $ */
+/* $Id: condition.c,v 1.30.2.1.10.4 2007/08/28 07:19:16 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/pthreads/include/isc/mutex.h b/lib/isc/pthreads/include/isc/mutex.h
index f6e526d8b2fa1..d180c55ab94e1 100644
--- a/lib/isc/pthreads/include/isc/mutex.h
+++ b/lib/isc/pthreads/include/isc/mutex.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mutex.h,v 1.23.26.3 2004/03/08 09:04:55 marka Exp $ */
+/* $Id: mutex.h,v 1.23.26.6 2007/08/28 07:19:17 tbox Exp $ */
#ifndef ISC_MUTEX_H
#define ISC_MUTEX_H 1
diff --git a/lib/isc/pthreads/mutex.c b/lib/isc/pthreads/mutex.c
index 71db6696610d3..17cca53fc6a72 100644
--- a/lib/isc/pthreads/mutex.c
+++ b/lib/isc/pthreads/mutex.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2000-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mutex.c,v 1.6.26.5 2005/03/17 03:58:32 marka Exp $ */
+/* $Id: mutex.c,v 1.6.26.8 2007/08/28 07:19:17 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/quota.c b/lib/isc/quota.c
index 273a1b2ac6ddb..b9cb3db9c63d6 100644
--- a/lib/isc/quota.c
+++ b/lib/isc/quota.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: quota.c,v 1.11.12.5 2005/07/29 00:13:09 marka Exp $ */
+/* $Id: quota.c,v 1.11.12.8 2007/08/28 07:19:15 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/ratelimiter.c b/lib/isc/ratelimiter.c
index 211363ccf0f1f..28976d018f70f 100644
--- a/lib/isc/ratelimiter.c
+++ b/lib/isc/ratelimiter.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ratelimiter.c,v 1.18.14.4 2004/03/08 09:04:50 marka Exp $ */
+/* $Id: ratelimiter.c,v 1.18.14.7 2007/08/28 07:19:15 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/region.c b/lib/isc/region.c
index 92f4f027f3d63..02386ad4bbd37 100644
--- a/lib/isc/region.c
+++ b/lib/isc/region.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2002, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: region.c,v 1.2.202.3 2004/03/08 09:04:50 marka Exp $ */
+/* $Id: region.c,v 1.2.202.6 2007/08/28 07:19:15 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/result.c b/lib/isc/result.c
index fd4e5c6cb98a1..37a487e71fb0b 100644
--- a/lib/isc/result.c
+++ b/lib/isc/result.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2001, 2003 Internet Software Consortium.
+ * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: result.c,v 1.56.2.2.8.9 2005/06/09 23:54:30 marka Exp $ */
+/* $Id: result.c,v 1.56.2.2.8.12 2007/08/28 07:19:15 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/symtab.c b/lib/isc/symtab.c
index 8b2b8c46bc33f..6102b18de0847 100644
--- a/lib/isc/symtab.c
+++ b/lib/isc/symtab.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1996-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1996-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: symtab.c,v 1.24.12.3 2004/03/08 09:04:50 marka Exp $ */
+/* $Id: symtab.c,v 1.24.12.6 2007/08/28 07:19:15 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/taskpool.c b/lib/isc/taskpool.c
index a3931a9fb90c8..6e2401de3b10e 100644
--- a/lib/isc/taskpool.c
+++ b/lib/isc/taskpool.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: taskpool.c,v 1.10.12.5 2006/01/04 23:50:21 marka Exp $ */
+/* $Id: taskpool.c,v 1.10.12.8 2007/08/28 07:19:15 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/timer.c b/lib/isc/timer.c
index 6a6acf6bb081b..d002b11722ce6 100644
--- a/lib/isc/timer.c
+++ b/lib/isc/timer.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2002 Internet Software Consortium.
+ * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: timer.c,v 1.64.12.13 2006/01/04 23:50:21 marka Exp $ */
+/* $Id: timer.c,v 1.64.12.17 2007/10/24 01:08:01 marka Exp $ */
#include <config.h>
@@ -582,6 +582,7 @@ dispatch(isc_timermgr_t *manager, isc_time_t *now) {
isc_eventtype_t type = 0;
isc_timer_t *timer;
isc_result_t result;
+ isc_boolean_t idle;
/*
* The caller must be holding the manager lock.
@@ -613,23 +614,33 @@ dispatch(isc_timermgr_t *manager, isc_time_t *now) {
type = ISC_TIMEREVENT_LIFE;
post_event = ISC_TRUE;
need_schedule = ISC_FALSE;
- } else if (!isc_time_isepoch(&timer->idle) &&
- isc_time_compare(now,
- &timer->idle) >= 0) {
- type = ISC_TIMEREVENT_IDLE;
- post_event = ISC_TRUE;
- need_schedule = ISC_FALSE;
} else {
- /*
- * Idle timer has been touched; reschedule.
- */
- XTRACEID(isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_TIMER,
- ISC_MSG_IDLERESCHED,
- "idle reschedule"),
- timer);
- post_event = ISC_FALSE;
- need_schedule = ISC_TRUE;
+ idle = ISC_FALSE;
+
+ LOCK(&timer->lock);
+ if (!isc_time_isepoch(&timer->idle) &&
+ isc_time_compare(now,
+ &timer->idle) >= 0) {
+ idle = ISC_TRUE;
+ }
+ UNLOCK(&timer->lock);
+ if (idle) {
+ type = ISC_TIMEREVENT_IDLE;
+ post_event = ISC_TRUE;
+ need_schedule = ISC_FALSE;
+ } else {
+ /*
+ * Idle timer has been touched;
+ * reschedule.
+ */
+ XTRACEID(isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_TIMER,
+ ISC_MSG_IDLERESCHED,
+ "idle reschedule"),
+ timer);
+ post_event = ISC_FALSE;
+ need_schedule = ISC_TRUE;
+ }
}
if (post_event) {
diff --git a/lib/isc/timer_p.h b/lib/isc/timer_p.h
index ad7a5d042b22a..22f7ae3881c05 100644
--- a/lib/isc/timer_p.h
+++ b/lib/isc/timer_p.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: timer_p.h,v 1.4.12.3 2004/03/08 09:04:50 marka Exp $ */
+/* $Id: timer_p.h,v 1.4.12.6 2007/08/28 07:19:15 tbox Exp $ */
#ifndef ISC_TIMER_P_H
#define ISC_TIMER_P_H
diff --git a/lib/isc/unix/Makefile.in b/lib/isc/unix/Makefile.in
index 49845d420d5b4..725ba68441daf 100644
--- a/lib/isc/unix/Makefile.in
+++ b/lib/isc/unix/Makefile.in
@@ -1,7 +1,7 @@
-# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-# Copyright (C) 1998-2001 Internet Software Consortium.
+# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 1998-2001, 2003 Internet Software Consortium.
#
-# Permission to use, copy, modify, and distribute this software for any
+# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.35.2.1.10.2 2004/06/22 02:48:36 marka Exp $
+# $Id: Makefile.in,v 1.35.2.1.10.5 2007/08/28 07:19:17 tbox Exp $
srcdir = @srcdir@
VPATH = @srcdir@
diff --git a/lib/isc/unix/app.c b/lib/isc/unix/app.c
index 811d67be1ff6f..8e1f0fafd306b 100644
--- a/lib/isc/unix/app.c
+++ b/lib/isc/unix/app.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: app.c,v 1.43.2.3.8.5 2004/03/08 02:08:05 marka Exp $ */
+/* $Id: app.c,v 1.43.2.3.8.8 2008/01/17 23:45:28 tbox Exp $ */
#include <config.h>
@@ -57,11 +57,11 @@ static isc_boolean_t running = ISC_FALSE;
/*
* We assume that 'want_shutdown' can be read and written atomically.
*/
-static isc_boolean_t want_shutdown = ISC_FALSE;
+static volatile isc_boolean_t want_shutdown = ISC_FALSE;
/*
* We assume that 'want_reload' can be read and written atomically.
*/
-static isc_boolean_t want_reload = ISC_FALSE;
+static volatile isc_boolean_t want_reload = ISC_FALSE;
static isc_boolean_t blocked = ISC_FALSE;
#ifdef ISC_PLATFORM_USETHREADS
@@ -85,13 +85,13 @@ static pthread_t main_thread;
#ifndef HAVE_SIGWAIT
static void
exit_action(int arg) {
- UNUSED(arg);
+ UNUSED(arg);
want_shutdown = ISC_TRUE;
}
static void
reload_action(int arg) {
- UNUSED(arg);
+ UNUSED(arg);
want_reload = ISC_TRUE;
}
#endif
@@ -337,7 +337,7 @@ evloop() {
* We call isc__timermgr_dispatch() only when
* necessary, in order to reduce overhead. If the
* select() call indicates a timeout, we need the
- * dispatch. Even if not, if we set the 0-timeout
+ * dispatch. Even if not, if we set the 0-timeout
* for the select() call, we need to check the timer
* events. In the 'readytasks' case, there may be no
* timeout event actually, but there is no other way
@@ -421,7 +421,7 @@ isc__nothread_signal_hack(isc_condition_t *cp) {
signalled = ISC_TRUE;
return (ISC_R_SUCCESS);
}
-
+
#endif /* ISC_PLATFORM_USETHREADS */
isc_result_t
@@ -674,7 +674,7 @@ isc_app_unblock(void) {
REQUIRE(blockedthread == pthread_self());
RUNTIME_CHECK(sigemptyset(&sset) == 0 &&
- sigaddset(&sset, SIGINT) == 0 &&
+ sigaddset(&sset, SIGINT) == 0 &&
sigaddset(&sset, SIGTERM) == 0);
RUNTIME_CHECK(pthread_sigmask(SIG_BLOCK, &sset, NULL) == 0);
#endif /* ISC_PLATFORM_USETHREADS */
diff --git a/lib/isc/unix/dir.c b/lib/isc/unix/dir.c
index 85a121739b4c7..29afb0f264b0a 100644
--- a/lib/isc/unix/dir.c
+++ b/lib/isc/unix/dir.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dir.c,v 1.18.2.1.2.3 2004/03/08 09:04:55 marka Exp $ */
+/* $Id: dir.c,v 1.18.2.1.2.6 2007/08/28 07:19:17 tbox Exp $ */
/* Principal Authors: DCL */
diff --git a/lib/isc/unix/entropy.c b/lib/isc/unix/entropy.c
index d52849aa35b84..f30a4725dcdcb 100644
--- a/lib/isc/unix/entropy.c
+++ b/lib/isc/unix/entropy.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: entropy.c,v 1.60.2.3.8.14 2006/03/02 23:29:17 marka Exp $ */
+/* $Id: entropy.c,v 1.60.2.3.8.15 2006/12/07 04:52:50 marka Exp $ */
/*
* This is the system depenedent part of the ISC entropy API.
@@ -486,8 +486,6 @@ isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
LOCK(&ent->lock);
- source = NULL;
-
if (stat(fname, &_stat) < 0) {
ret = isc__errno2result(errno);
goto errout;
@@ -589,9 +587,6 @@ isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
(void)close(fd);
errout:
- if (source != NULL)
- isc_mem_put(ent->mctx, source, sizeof(isc_entropysource_t));
-
UNLOCK(&ent->lock);
return (ret);
diff --git a/lib/isc/unix/errno2result.c b/lib/isc/unix/errno2result.c
index 66a4e916d79c4..d25dcb288f50b 100644
--- a/lib/isc/unix/errno2result.c
+++ b/lib/isc/unix/errno2result.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2000-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: errno2result.c,v 1.8.2.4.8.1 2004/03/06 08:14:59 marka Exp $ */
+/* $Id: errno2result.c,v 1.8.2.4.8.4 2007/08/28 07:19:17 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/unix/file.c b/lib/isc/unix/file.c
index 7ed6272efb73a..8e4e87c6077c1 100644
--- a/lib/isc/unix/file.c
+++ b/lib/isc/unix/file.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000-2002 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2000-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -48,7 +48,7 @@
* SUCH DAMAGE.
*/
-/* $Id: file.c,v 1.38.12.8 2004/03/16 05:50:25 marka Exp $ */
+/* $Id: file.c,v 1.38.12.11 2007/08/28 07:19:17 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/unix/ifiter_getifaddrs.c b/lib/isc/unix/ifiter_getifaddrs.c
index ad6e1e0b04099..ac4edc8922c30 100644
--- a/lib/isc/unix/ifiter_getifaddrs.c
+++ b/lib/isc/unix/ifiter_getifaddrs.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ifiter_getifaddrs.c,v 1.2.68.3 2004/03/06 08:14:59 marka Exp $ */
+/* $Id: ifiter_getifaddrs.c,v 1.2.68.6 2007/08/28 07:19:17 tbox Exp $ */
/*
* Obtain the list of network interfaces using the getifaddrs(3) library.
@@ -106,7 +106,9 @@ internal_current(isc_interfaceiter_t *iter) {
INSIST(ifa != NULL);
INSIST(ifa->ifa_name != NULL);
- INSIST(ifa->ifa_addr != NULL);
+
+ if (ifa->ifa_addr == NULL)
+ return (ISC_R_IGNORE);
family = ifa->ifa_addr->sa_family;
if (family != AF_INET && family != AF_INET6)
diff --git a/lib/isc/unix/ifiter_ioctl.c b/lib/isc/unix/ifiter_ioctl.c
index 68a13651bc86a..ce8baf7e99ebf 100644
--- a/lib/isc/unix/ifiter_ioctl.c
+++ b/lib/isc/unix/ifiter_ioctl.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ifiter_ioctl.c,v 1.19.2.5.2.19 2006/02/03 23:51:37 marka Exp $ */
+/* $Id: ifiter_ioctl.c,v 1.19.2.5.2.21 2007/08/31 23:45:57 tbox Exp $ */
/*
* Obtain the list of network interfaces using the SIOCGLIFCONF ioctl.
@@ -904,7 +904,8 @@ internal_next4(isc_interfaceiter_t *iter) {
struct ifreq *ifrp;
#endif
- REQUIRE (iter->pos < (unsigned int) iter->ifc.ifc_len);
+ REQUIRE(iter->ifc.ifc_len == 0 ||
+ iter->pos < (unsigned int) iter->ifc.ifc_len);
#ifdef __linux
if (linux_if_inet6_next(iter) == ISC_R_SUCCESS)
@@ -912,6 +913,10 @@ internal_next4(isc_interfaceiter_t *iter) {
if (!iter->first)
return (ISC_R_SUCCESS);
#endif
+
+ if (iter->ifc.ifc_len == 0)
+ return (ISC_R_NOMORE);
+
#ifdef ISC_PLATFORM_HAVESALEN
ifrp = (struct ifreq *)((char *) iter->ifc.ifc_req + iter->pos);
diff --git a/lib/isc/unix/include/isc/dir.h b/lib/isc/unix/include/isc/dir.h
index 53b51df087b1c..e9e965963bac6 100644
--- a/lib/isc/unix/include/isc/dir.h
+++ b/lib/isc/unix/include/isc/dir.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dir.h,v 1.15.12.3 2004/03/08 09:04:57 marka Exp $ */
+/* $Id: dir.h,v 1.15.12.6 2007/08/28 07:19:17 tbox Exp $ */
/* Principal Authors: DCL */
diff --git a/lib/isc/unix/include/isc/strerror.h b/lib/isc/unix/include/isc/strerror.h
index f51fbdc2d04cf..7577b1ccb2e66 100644
--- a/lib/isc/unix/include/isc/strerror.h
+++ b/lib/isc/unix/include/isc/strerror.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: strerror.h,v 1.2.12.3 2004/03/08 09:04:57 marka Exp $ */
+/* $Id: strerror.h,v 1.2.12.6 2007/08/28 07:19:17 tbox Exp $ */
#ifndef ISC_STRERROR_H
#define ISC_STRERROR_H
diff --git a/lib/isc/unix/include/isc/time.h b/lib/isc/unix/include/isc/time.h
index 6021c13d9295b..c592862c6e019 100644
--- a/lib/isc/unix/include/isc/time.h
+++ b/lib/isc/unix/include/isc/time.h
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: time.h,v 1.25.2.1.10.4 2004/03/08 09:04:58 marka Exp $ */
+/* $Id: time.h,v 1.25.2.1.10.7 2007/08/28 07:19:17 tbox Exp $ */
#ifndef ISC_TIME_H
#define ISC_TIME_H 1
diff --git a/lib/isc/unix/keyboard.c b/lib/isc/unix/keyboard.c
index 146338aebe75e..5828ef0461d71 100644
--- a/lib/isc/unix/keyboard.c
+++ b/lib/isc/unix/keyboard.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: keyboard.c,v 1.9.12.3 2004/03/08 09:04:56 marka Exp $ */
+/* $Id: keyboard.c,v 1.9.12.6 2007/08/28 07:19:17 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/unix/net.c b/lib/isc/unix/net.c
index e0aeccbbbf4d8..42cadec7d7617 100644
--- a/lib/isc/unix/net.c
+++ b/lib/isc/unix/net.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: net.c,v 1.22.2.2.10.9 2005/03/17 03:58:33 marka Exp $ */
+/* $Id: net.c,v 1.22.2.2.10.11 2007/09/13 23:45:58 tbox Exp $ */
#include <config.h>
@@ -30,17 +30,26 @@
#include <isc/string.h>
#include <isc/util.h>
-#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRANY)
+#if defined(ISC_PLATFORM_HAVEIPV6)
+# if defined(ISC_PLATFORM_NEEDIN6ADDRANY)
const struct in6_addr isc_net_in6addrany = IN6ADDR_ANY_INIT;
-#endif
+# endif
-#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
+# if defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
const struct in6_addr isc_net_in6addrloop = IN6ADDR_LOOPBACK_INIT;
-#endif
+# endif
-static isc_once_t once = ISC_ONCE_INIT;
+# if defined(WANT_IPV6)
static isc_once_t once_ipv6only = ISC_ONCE_INIT;
+# endif
+
+# if defined(ISC_PLATFORM_HAVEIN6PKTINFO)
static isc_once_t once_ipv6pktinfo = ISC_ONCE_INIT;
+# endif
+#endif /* ISC_PLATFORM_HAVEIPV6 */
+
+static isc_once_t once = ISC_ONCE_INIT;
+
static isc_result_t ipv4_result = ISC_R_NOTFOUND;
static isc_result_t ipv6_result = ISC_R_NOTFOUND;
static isc_result_t ipv6only_result = ISC_R_NOTFOUND;
@@ -235,7 +244,7 @@ initialize_ipv6only(void) {
RUNTIME_CHECK(isc_once_do(&once_ipv6only,
try_ipv6only) == ISC_R_SUCCESS);
}
-#endif /* IPV6_V6ONLY */
+#endif /* WANT_IPV6 */
#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
static void
@@ -291,7 +300,7 @@ initialize_ipv6pktinfo(void) {
try_ipv6pktinfo) == ISC_R_SUCCESS);
}
#endif /* ISC_PLATFORM_HAVEIN6PKTINFO */
-#endif /* WANT_IPV6 */
+#endif /* ISC_PLATFORM_HAVEIPV6 */
isc_result_t
isc_net_probe_ipv6only(void) {
diff --git a/lib/isc/unix/os.c b/lib/isc/unix/os.c
index 4d34d8ce6f47e..fb37acdca61df 100644
--- a/lib/isc/unix/os.c
+++ b/lib/isc/unix/os.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000, 2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: os.c,v 1.11.12.6 2005/10/14 02:13:07 marka Exp $ */
+/* $Id: os.c,v 1.11.12.9 2007/08/28 07:19:17 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/unix/resource.c b/lib/isc/unix/resource.c
index b6faf32a5e4d3..bfec43d32d454 100644
--- a/lib/isc/unix/resource.c
+++ b/lib/isc/unix/resource.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: resource.c,v 1.11.206.1 2004/03/06 08:15:01 marka Exp $ */
+/* $Id: resource.c,v 1.11.206.3 2008/01/26 23:45:31 tbox Exp $ */
#include <config.h>
@@ -40,13 +40,13 @@ resource2rlim(isc_resource_t resource, int *rlim_resource) {
break;
case isc_resource_cputime:
*rlim_resource = RLIMIT_CPU;
- break;
+ break;
case isc_resource_datasize:
*rlim_resource = RLIMIT_DATA;
- break;
+ break;
case isc_resource_filesize:
*rlim_resource = RLIMIT_FSIZE;
- break;
+ break;
case isc_resource_lockedmemory:
#ifdef RLIMIT_MEMLOCK
*rlim_resource = RLIMIT_MEMLOCK;
@@ -79,7 +79,7 @@ resource2rlim(isc_resource_t resource, int *rlim_resource) {
*rlim_resource = RLIMIT_STACK;
break;
default:
- /*
+ /*
* This test is not very robust if isc_resource_t
* changes, but generates a clear assertion message.
*/
@@ -132,58 +132,27 @@ isc_resource_setlimit(isc_resource_t resource, isc_resourcevalue_t value) {
rlim_value = value;
}
- /*
- * The BIND 8 documentation reports:
- *
- * Note: on some operating systems the server cannot set an
- * unlimited value and cannot determine the maximum number of
- * open files the kernel can support. On such systems, choosing
- * unlimited will cause the server to use the larger of the
- * rlim_max for RLIMIT_NOFILE and the value returned by
- * sysconf(_SC_OPEN_MAX). If the actual kernel limit is larger
- * than this value, use limit files to specify the limit
- * explicitly.
- *
- * The CHANGES for 8.1.2-T3A also mention:
- *
- * 352. [bug] Because of problems with setting an infinite
- * rlim_max for RLIMIT_NOFILE on some systems, previous versions
- * of the server implemented "limit files unlimited" by setting
- * the limit to the value returned by sysconf(_SC_OPEN_MAX). The
- * server will now use RLIM_INFINITY on systems which allow it.
- *
- * At some point the BIND 8 server stopped using SC_OPEN_MAX for this
- * purpose at all, but it isn't clear to me when or why, as my access
- * to the CVS archive is limited at the time of this writing. What
- * BIND 8 *does* do is to set RLIMIT_NOFILE to either RLIMIT_INFINITY
- * on a half dozen operating systems or to FD_SETSIZE on the rest,
- * the latter of which is probably fewer than the real limit. (Note
- * that libisc's socket module will have problems with any fd over
- * FD_SETSIZE. This should be fixed in the socket module, not a
- * limitation here. BIND 8's eventlib also has a problem, making
- * its RLIMIT_INFINITY setting useless, because it closes and ignores
- * any fd over FD_SETSIZE.)
- *
- * More troubling is the reference to some operating systems not being
- * able to set an unlimited value for the number of open files. I'd
- * hate to put in code that is really only there to support archaic
- * systems that the rest of libisc won't work on anyway. So what this
- * extremely verbose comment is here to say is the following:
- *
- * I'm aware there might be an issue with not limiting the value
- * for RLIMIT_NOFILE on some systems, but since I don't know yet
- * what those systems are and what the best workaround is (use
- * sysconf()? rlim_max from getrlimit()? FD_SETSIZE?) so nothing
- * is currently being done to clamp the value for open files.
- */
-
rl.rlim_cur = rl.rlim_max = rlim_value;
unixresult = setrlimit(unixresource, &rl);
if (unixresult == 0)
return (ISC_R_SUCCESS);
- else
- return (isc__errno2result(errno));
+
+#if defined(OPEN_MAX) && defined(__APPLE__)
+ /*
+ * The Darwin kernel doesn't accept RLIM_INFINITY for rlim_cur; the
+ * maximum possible value is OPEN_MAX. BIND8 used to use
+ * sysconf(_SC_OPEN_MAX) for such a case, but this value is much
+ * smaller than OPEN_MAX and is not really effective.
+ */
+ if (resource == isc_resource_openfiles && rlim_value == RLIM_INFINITY) {
+ rl.rlim_cur = OPEN_MAX;
+ unixresult = setrlimit(unixresource, &rl);
+ if (unixresult == 0)
+ return (ISC_R_SUCCESS);
+ }
+#endif
+ return (isc__errno2result(errno));
}
isc_result_t
diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c
index f95e3c8f75d41..7322abc2518e3 100644
--- a/lib/isc/unix/socket.c
+++ b/lib/isc/unix/socket.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: socket.c,v 1.207.2.19.2.26 2006/05/19 02:53:36 marka Exp $ */
+/* $Id: socket.c,v 1.207.2.19.2.35 2008/01/27 02:06:07 marka Exp $ */
#include <config.h>
@@ -42,6 +42,7 @@
#include <isc/msgs.h>
#include <isc/mutex.h>
#include <isc/net.h>
+#include <isc/once.h>
#include <isc/platform.h>
#include <isc/print.h>
#include <isc/region.h>
@@ -57,6 +58,10 @@
#include "socket_p.h"
#endif /* ISC_PLATFORM_USETHREADS */
+#if defined(SO_BSDCOMPAT) && defined(__linux__)
+#include <sys/utsname.h>
+#endif
+
/*
* Some systems define the socket length argument as an int, some as size_t,
* some as socklen_t. This is here so it can be easily changed if needed.
@@ -400,7 +405,7 @@ select_readmsg(isc_socketmgr_t *mgr, int *fd, int *msg) {
"read() failed "
"during watcher poke: %s"),
strbuf);
-
+
return;
}
INSIST(cc == sizeof(buf));
@@ -505,7 +510,7 @@ cmsg_space(ISC_SOCKADDR_LEN_T len) {
return ((char *)cmsgp - (char *)msg.msg_control);
else
return (0);
-#endif
+#endif
}
#endif /* USE_CMSG */
@@ -579,7 +584,7 @@ process_cmsg(isc_socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) {
"interface received on ifindex %u",
dev->pktinfo.ipi6_ifindex);
if (IN6_IS_ADDR_MULTICAST(&pktinfop->ipi6_addr))
- dev->attributes |= ISC_SOCKEVENTATTR_MULTICAST;
+ dev->attributes |= ISC_SOCKEVENTATTR_MULTICAST;
goto next;
}
#endif
@@ -951,7 +956,7 @@ doio_recv(isc_socket_t *sock, isc_socketevent_t *dev) {
isc__strerror(recv_errno, strbuf, sizeof(strbuf));
socket_log(sock, NULL, IOEVENT,
isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_DOIORECV,
+ ISC_MSG_DOIORECV,
"doio_recv: recvmsg(%d) %d bytes, err %d/%s",
sock->fd, cc, recv_errno, strbuf);
}
@@ -999,7 +1004,7 @@ doio_recv(isc_socket_t *sock, isc_socketevent_t *dev) {
if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) {
socket_log(sock, &dev->address, IOEVENT,
isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_ZEROPORT,
+ ISC_MSG_ZEROPORT,
"dropping source port zero packet");
}
return (DOIO_SOFT);
@@ -1368,7 +1373,45 @@ free_socket(isc_socket_t **socketp) {
*socketp = NULL;
}
+#ifdef SO_BSDCOMPAT
/*
+ * This really should not be necessary to do. Having to workout
+ * which kernel version we are on at run time so that we don't cause
+ * the kernel to issue a warning about us using a deprecated socket option.
+ * Such warnings should *never* be on by default in production kernels.
+ *
+ * We can't do this a build time because executables are moved between
+ * machines and hence kernels.
+ *
+ * We can't just not set SO_BSDCOMAT because some kernels require it.
+ */
+
+static isc_once_t bsdcompat_once = ISC_ONCE_INIT;
+isc_boolean_t bsdcompat = ISC_TRUE;
+
+static void
+clear_bsdcompat(void) {
+#ifdef __linux__
+ struct utsname buf;
+ char *endp;
+ long int major;
+ long int minor;
+
+ uname(&buf); /* Can only fail if buf is bad in Linux. */
+
+ /* Paranoia in parsing can be increased, but we trust uname(). */
+ major = strtol(buf.release, &endp, 10);
+ if (*endp == '.') {
+ minor = strtol(endp+1, &endp, 10);
+ if ((major > 2) || ((major == 2) && (minor >= 4))) {
+ bsdcompat = ISC_FALSE;
+ }
+ }
+#endif /* __linux __ */
+}
+#endif
+
+/*%
* Create a new 'type' socket managed by 'manager'. Events
* will be posted to 'task' and when dispatched 'action' will be
* called with 'arg' as the arg value. The new socket is returned
@@ -1385,6 +1428,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
#endif
char strbuf[ISC_STRERRORSIZE];
const char *err = "socket";
+ int tries = 0;
REQUIRE(VALID_MANAGER(manager));
REQUIRE(socketp != NULL && *socketp == NULL);
@@ -1394,6 +1438,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
return (ret);
sock->pf = pf;
+ again:
switch (type) {
case isc_sockettype_udp:
sock->fd = socket(pf, SOCK_DGRAM, IPPROTO_UDP);
@@ -1402,6 +1447,8 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
sock->fd = socket(pf, SOCK_STREAM, IPPROTO_TCP);
break;
}
+ if (sock->fd == -1 && errno == EINTR && tries++ < 42)
+ goto again;
#ifdef F_DUPFD
/*
@@ -1428,7 +1475,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
free_socket(&sock);
return (ISC_R_NORESOURCES);
}
-
+
if (sock->fd < 0) {
free_socket(&sock);
@@ -1468,8 +1515,10 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
}
#ifdef SO_BSDCOMPAT
- if (setsockopt(sock->fd, SOL_SOCKET, SO_BSDCOMPAT,
- (void *)&on, sizeof(on)) < 0) {
+ RUNTIME_CHECK(isc_once_do(&bsdcompat_once,
+ clear_bsdcompat) == ISC_R_SUCCESS);
+ if (bsdcompat && setsockopt(sock->fd, SOL_SOCKET, SO_BSDCOMPAT,
+ (void *)&on, sizeof(on)) < 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d, SO_BSDCOMPAT) %s: %s",
@@ -1481,6 +1530,20 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
}
#endif
+#ifdef SO_NOSIGPIPE
+ if (setsockopt(sock->fd, SOL_SOCKET, SO_NOSIGPIPE,
+ (void *)&on, sizeof(on)) < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ "setsockopt(%d, SO_NOSIGPIPE) %s: %s",
+ sock->fd,
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
+ ISC_MSG_FAILED, "failed"),
+ strbuf);
+ /* Press on... */
+ }
+#endif
+
#if defined(USE_CMSG)
if (type == isc_sockettype_udp) {
@@ -1491,7 +1554,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d, SO_TIMESTAMP) %s: %s",
- sock->fd,
+ sock->fd,
isc_msgcat_get(isc_msgcat,
ISC_MSGSET_GENERAL,
ISC_MSG_FAILED,
@@ -1513,7 +1576,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
}
#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
#ifdef IPV6_RECVPKTINFO
- /* 2292bis */
+ /* RFC 3542 */
if ((pf == AF_INET6)
&& (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO,
(void *)&on, sizeof(on)) < 0)) {
@@ -1528,7 +1591,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
strbuf);
}
#else
- /* 2292 */
+ /* RFC 2292 */
if ((pf == AF_INET6)
&& (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_PKTINFO,
(void *)&on, sizeof(on)) < 0)) {
@@ -1544,7 +1607,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
}
#endif /* IPV6_RECVPKTINFO */
#endif /* ISC_PLATFORM_HAVEIN6PKTINFO */
-#ifdef IPV6_USE_MIN_MTU /*2292bis, not too common yet*/
+#ifdef IPV6_USE_MIN_MTU /* RFC 3542, not too common yet*/
/* use minimum MTU */
if (pf == AF_INET6) {
(void)setsockopt(sock->fd, IPPROTO_IPV6,
@@ -1851,7 +1914,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
*/
addrlen = sizeof(dev->newsocket->address.type);
- memset(&dev->newsocket->address.type.sa, 0, addrlen);
+ memset(&dev->newsocket->address.type, 0, addrlen);
fd = accept(sock->fd, &dev->newsocket->address.type.sa,
(void *)&addrlen);
@@ -1919,7 +1982,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"internal_accept(): "
"accept() returned peer address "
- "family %u (expected %u)",
+ "family %u (expected %u)",
dev->newsocket->address.
type.sa.sa_family,
sock->pf);
@@ -1992,7 +2055,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
dev->newsocket->references--;
free_socket(&dev->newsocket);
}
-
+
/*
* Fill in the done event details and send it off.
*/
diff --git a/lib/isc/unix/stdtime.c b/lib/isc/unix/stdtime.c
index b8d818dcfd7a9..3833b27d7c016 100644
--- a/lib/isc/unix/stdtime.c
+++ b/lib/isc/unix/stdtime.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: stdtime.c,v 1.11.2.1.10.5 2005/06/09 23:54:31 marka Exp $ */
+/* $Id: stdtime.c,v 1.11.2.1.10.8 2007/08/28 07:19:17 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/unix/strerror.c b/lib/isc/unix/strerror.c
index 863867e15953f..5d7d7c5f1ab98 100644
--- a/lib/isc/unix/strerror.c
+++ b/lib/isc/unix/strerror.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: strerror.c,v 1.1.2.1.10.3 2004/03/08 09:04:57 marka Exp $ */
+/* $Id: strerror.c,v 1.1.2.1.10.6 2007/08/28 07:19:17 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/unix/syslog.c b/lib/isc/unix/syslog.c
index e53154452254a..8e898c3a12f39 100644
--- a/lib/isc/unix/syslog.c
+++ b/lib/isc/unix/syslog.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,15 +15,15 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: syslog.c,v 1.1.12.3 2004/03/08 09:04:57 marka Exp $ */
+/* $Id: syslog.c,v 1.1.12.7 2007/09/13 05:18:08 each Exp $ */
#include <config.h>
#include <stdlib.h>
-#include <string.h>
#include <syslog.h>
#include <isc/result.h>
+#include <isc/string.h>
#include <isc/syslog.h>
#include <isc/util.h>
diff --git a/lib/isc/version.c b/lib/isc/version.c
index d0f270d4a47d8..286b25551b9a6 100644
--- a/lib/isc/version.c
+++ b/lib/isc/version.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1998-2001 Internet Software Consortium.
+ * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1998-2001, 2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: version.c,v 1.9.12.3 2004/03/08 09:04:51 marka Exp $ */
+/* $Id: version.c,v 1.9.12.6 2007/08/28 07:19:15 tbox Exp $ */
#include <isc/version.h>