ANNOUNCEMENT: NSD 1.2.0 released

This release implements various new features and bug fixes.

NSD 1.2.0 has been regression tested against Bind 8.3.4. See the DIFFERENCES document for more information.

Due to the number of changes between this release and previous releases you should test this release thoroughly before upgrading your production environment.

Please read the README document for configuration and installation instructions.

You can download NSD from http://www.nlnetlabs.nl/nsd/

NSD 1.2.0 release notes:

FEATURES:
         - NSD is now a single parent process (handling child
           termination and database reloads) plus multiple UDP and TCP
           child processes handling queries. Before the parent process
           also handled UDP queries. This change simplifies the parent
           and child processes and allows the use of multiple
           concurrent UDP servers.
         - Experimental plugin support. This required a minor,
           incompatible change to the database format. Make sure you
           recompile your database. Use --enable-plugins to enable.
         - Full IPv6 support (for multi-homing and for Linux, thanks to
           Colm MacCarthaigh and Jun-ichiro itojun Hagino). Use
           --enable-ipv6 to enable.
         - Support for multi-homing with TCP connections.
         - Support for SunOS 4.x has been dropped.

CODE CHANGES:
         - NSD should now conform to the Single Unix Specification
           (http://www.unix.org/).
         - Const correctness for strings and some other data types.
         - Removed code for Berkeley DB, hash tables, and mmap(2).
         - Separate preprocessor flags from code flags (CPPFLAGS and
           CFLAGS).
         - Use uint8_t instead of u_char, uint{16,32}_t instead of
           u_int{16,32}_t.
         - Fixed warnings from mixing signed and unsigned types.
         - Use sigaction(2) instead of signal(2).
         - The query_process function has been split up for clarity.

BUG FIXES:
         - CHAOS TXT queries failed on big-endian machines.
         - Portability fixes for Tru64 (thanks to Stephane Bortzmeyer),
           HP-UX, and MacOS X (thanks to Ronald van der Pol).
         - Removed compile time limit on maximum number of TCP child
           servers.
         - Support for debugging UDP and TCP queries.
         - Always ensure there is enough room for the EDNS record when
           answering a query with EDNS enabled.

Looks great! Needs a slight kick to work though ... :slight_smile:

--- nsd-1.2.0/nsd-plugin.h Wed Jul 9 14:40:11 2003
+++ nsd-1.2.0/nsd-plugin.h Wed Jul 9 14:40:53 2003
@@ -41,7 +41,7 @@
#ifndef _NSD_PLUGIN_H_
#define _NSD_PLUGIN_H_

-#ifdef HAVE_CONFIG_H
+#ifndef HAVE_CONFIG_H
#include <config.h>
#endif

Colm MacCarthaigh wrote:

Might be an idea, I have autoconf templated and a Makefile.in
for my acl plugin (their attached) but it's quite messy!

I've compiled the example plugin using

gcc -shared -I$nsdsource -DHAVE_CONFIG_H $nsdsource/dname.c \
example-plugin.c -o example-plugin.so

and it's working just fine for .nl, but if I create subdomains
I'm in trouble. What would the equivelant for

nsd->register_data(nsd, id, "\004\002nl", "hello, world!");

be for example.com ? I've tried:

  "\004\002example.com",
  "\004\002example\004\002com",
  "\004\002example\002com"

without success.

(attachments)

configure.ac (917 Bytes)
Makefile.in (1.41 KB)

Colm MacCarthaigh wrote:

Actually, you just need to make sure you compile with -I<nsd-source-dir> -DHAVE_CONFIG_H. Try to use the same CPPFLAGS and CFLAGS for your plugin as you used to compile NSD. Or adapt the "example-plugin" rules in Makefile.in for your own plugins.

Or maybe there should be a sample/reference Makefile for plugins...

Might be an idea, I have autoconf templated and a Makefile.in
for my acl plugin (their attached) but it's quite messy!

I've compiled the example plugin using

gcc -shared -I$nsdsource -DHAVE_CONFIG_H $nsdsource/dname.c \
example-plugin.c -o example-plugin.so

and it's working just fine for .nl, but if I create subdomains
I'm in trouble. What would the equivelant for

nsd->register_data(nsd, id, "\004\002nl", "hello, world!");

be for example.com ? I've tried:

  "\004\002example.com", "\004\002example\004\002com",
  "\004\002example\002com"

without success.

The first byte contains the total length of the domain name in bytes (not including the length byte itself). This is how NSD stores names internally. You can try to use strdname from dname.[hc] and link this into your plugin. Note that strdname stores the result in a static buffer, so subsequent calls will overwrite this. But it is usually good enough for registering data:

nsd->register_data(nsd, id, strdname("example.com", NULL), "data");

Otherwise it should be something like this:

\015\007example\003com (where 15 octal is 13 decimal, 1+7 for the "example" length+label, 1+3 for the "com" length+label, and 1+0 for the "."/root length+label.)

Hope this helps and works :slight_smile:

Erik

Excellent! Thank you, would have taken me a while to find that.