From: <abe...@us...> - 2015-10-27 22:44:45
|
Revision: 7288 http://sourceforge.net/p/astlinux/code/7288 Author: abelbeck Date: 2015-10-27 22:44:42 +0000 (Tue, 27 Oct 2015) Log Message: ----------- wide-dhcpv6, new package, disabled for now. Adds DHCPv6 client support but configuration is missing. Includes 10 patches from the Debian project to make it current. Much smaller than dibbler. Modified Paths: -------------- branches/1.0/astlinux-ast11.config branches/1.0/astlinux-ast13.config branches/1.0/astlinux18.config branches/1.0/initrd.config branches/1.0/package/Config.in branches/1.0/runnix-uclibc.config branches/1.0/runnix.config Added Paths: ----------- branches/1.0/package/wide-dhcpv6/ branches/1.0/package/wide-dhcpv6/Config.in branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0001-Fix-manpages.patch branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0002-Don-t-strip-binaries.patch branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0003-Close-inherited-file-descriptors.patch branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0004-GNU-libc6-fixes.patch branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0005-Update-ifid-on-interface-restart.patch branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0006-Add-new-feature-dhcp6c-profiles.patch branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0007-Adding-ifid-option-to-the-dhcp6c.conf-prefix-interfa.patch branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0008-Close-file-descriptors-on-exec.patch branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0009-Fix-renewal-of-IA-NA.patch branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0010-Call-client-script-after-interfaces-have-been-update.patch branches/1.0/package/wide-dhcpv6/wide-dhcpv6.mk Modified: branches/1.0/astlinux-ast11.config =================================================================== --- branches/1.0/astlinux-ast11.config 2015-10-26 21:58:09 UTC (rev 7287) +++ branches/1.0/astlinux-ast11.config 2015-10-27 22:44:42 UTC (rev 7288) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn7286-dirty Configuration -# Mon Oct 26 16:51:59 2015 +# Buildroot 2011.08-svn7287-dirty Configuration +# Tue Oct 27 17:37:38 2015 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -799,6 +799,7 @@ # BR2_PACKAGE_VPNC is not set BR2_PACKAGE_VSFTPD=y # BR2_PACKAGE_VTUN is not set +# BR2_PACKAGE_WIDE_DHCPV6 is not set # BR2_PACKAGE_WIRELESS_TOOLS is not set # BR2_PACKAGE_WPA_SUPPLICANT is not set Modified: branches/1.0/astlinux-ast13.config =================================================================== --- branches/1.0/astlinux-ast13.config 2015-10-26 21:58:09 UTC (rev 7287) +++ branches/1.0/astlinux-ast13.config 2015-10-27 22:44:42 UTC (rev 7288) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn7286-dirty Configuration -# Mon Oct 26 16:52:01 2015 +# Buildroot 2011.08-svn7287-dirty Configuration +# Tue Oct 27 17:37:39 2015 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -799,6 +799,7 @@ # BR2_PACKAGE_VPNC is not set BR2_PACKAGE_VSFTPD=y # BR2_PACKAGE_VTUN is not set +# BR2_PACKAGE_WIDE_DHCPV6 is not set # BR2_PACKAGE_WIRELESS_TOOLS is not set # BR2_PACKAGE_WPA_SUPPLICANT is not set Modified: branches/1.0/astlinux18.config =================================================================== --- branches/1.0/astlinux18.config 2015-10-26 21:58:09 UTC (rev 7287) +++ branches/1.0/astlinux18.config 2015-10-27 22:44:42 UTC (rev 7288) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn7286-dirty Configuration -# Mon Oct 26 16:51:52 2015 +# Buildroot 2011.08-svn7287-dirty Configuration +# Tue Oct 27 17:37:36 2015 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -799,6 +799,7 @@ # BR2_PACKAGE_VPNC is not set BR2_PACKAGE_VSFTPD=y # BR2_PACKAGE_VTUN is not set +# BR2_PACKAGE_WIDE_DHCPV6 is not set # BR2_PACKAGE_WIRELESS_TOOLS is not set # BR2_PACKAGE_WPA_SUPPLICANT is not set Modified: branches/1.0/initrd.config =================================================================== --- branches/1.0/initrd.config 2015-10-26 21:58:09 UTC (rev 7287) +++ branches/1.0/initrd.config 2015-10-27 22:44:42 UTC (rev 7288) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot 2011.08-svn7286-dirty Configuration -# Mon Oct 26 16:52:31 2015 +# Buildroot 2011.08-svn7287-dirty Configuration +# Tue Oct 27 17:37:43 2015 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -645,6 +645,7 @@ # BR2_PACKAGE_VPNC is not set # BR2_PACKAGE_VSFTPD is not set # BR2_PACKAGE_VTUN is not set +# BR2_PACKAGE_WIDE_DHCPV6 is not set # BR2_PACKAGE_WIRELESS_TOOLS is not set # BR2_PACKAGE_WPA_SUPPLICANT is not set Modified: branches/1.0/package/Config.in =================================================================== --- branches/1.0/package/Config.in 2015-10-26 21:58:09 UTC (rev 7287) +++ branches/1.0/package/Config.in 2015-10-27 22:44:42 UTC (rev 7288) @@ -552,6 +552,7 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/wget/Config.in" endif +source "package/wide-dhcpv6/Config.in" source "package/wireless_tools/Config.in" source "package/wpa_supplicant/Config.in" Added: branches/1.0/package/wide-dhcpv6/Config.in =================================================================== --- branches/1.0/package/wide-dhcpv6/Config.in (rev 0) +++ branches/1.0/package/wide-dhcpv6/Config.in 2015-10-27 22:44:42 UTC (rev 7288) @@ -0,0 +1,14 @@ +config BR2_PACKAGE_WIDE_DHCPV6 + bool "wide-dhcpv6" + help + WIDE-DHCPv6 is an open-source implementation of Dynamic Host Configuration Protocol + for IPv6 (DHCPv6) originally developed by the KAME project. + + This package installs the client component. + + http://sourceforge.net/projects/wide-dhcpv6/ + + Debian Patches: + http://git.famille-corbier.net/?p=packages/wide-dhcpv6.git;a=summary + http://http.debian.net/debian/pool/main/w/wide-dhcpv6/wide-dhcpv6_20080615-13.debian.tar.xz + Added: branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0001-Fix-manpages.patch =================================================================== --- branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0001-Fix-manpages.patch (rev 0) +++ branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0001-Fix-manpages.patch 2015-10-27 22:44:42 UTC (rev 7288) @@ -0,0 +1,168 @@ +From e9fd60840eb125dcd55aab859dd838a47c02931f Mon Sep 17 00:00:00 2001 +From: Jeremie Corbier <jer...@fa...> +Date: Tue, 6 Apr 2010 15:51:03 +0200 +Subject: [PATCH] Fix manpages + +This patch fixes wide-dhcpv6 manpages (paths, typos, ...). + +Signed-off-by: Jeremie Corbier <je...@fa...> +--- + dhcp6c.8 | 8 ++++---- + dhcp6c.conf.5 | 4 ++-- + dhcp6ctl.8 | 13 ++++++------- + dhcp6relay.8 | 1 - + dhcp6s.8 | 10 +++++----- + dhcp6s.conf.5 | 2 +- + 6 files changed, 18 insertions(+), 20 deletions(-) + +diff --git a/dhcp6c.8 b/dhcp6c.8 +index 6824ae0..1d69c9d 100644 +--- a/dhcp6c.8 ++++ b/dhcp6c.8 +@@ -114,13 +114,13 @@ In either case, + will send DHCPv6 Release messages to release resources assigned from servers. + .\" + .Sh FILES +-.Bl -tag -width /usr/local/etc/dhcp6c.conf -compact ++.Bl -tag -width /etc/wide-dhcpv6/dhcp6c.conf -compact + .It Pa /var/run/dhcp6c.pid + is the default file that contains pid of the currently running + .Nm dhcp6c . +-.It Pa /usr/local/etc/dhcp6c.conf ++.It Pa /etc/wide-dhcpv6/dhcp6c.conf + is the default configuration file. +-.It Pa /var/db/dhcp6c_duid ++.It Pa /var/lib/dhcpv6/dhcp6c_duid + is the file to store the client's DUID. + .El + .Sh Configuration Script +@@ -203,6 +203,6 @@ command first appeared in WIDE/KAME IPv6 protocol stack kit. + is incomplete and violates DHCPv6 protocol spec, in several aspects. + In particular, temporary address assignment is intentionally omitted. + .Pp +-Information Refresh Time Option is not recognied in Info-req mode, since ++Information Refresh Time Option is not recognized in Info-req mode, since + .Nm + terminates after it receives a REPLY message. +diff --git a/dhcp6c.conf.5 b/dhcp6c.conf.5 +index 611ab4f..5fc03d3 100644 +--- a/dhcp6c.conf.5 ++++ b/dhcp6c.conf.5 +@@ -36,7 +36,7 @@ + .Nd DHCPv6 client configuration file + .\" + .Sh SYNOPSIS +-.Pa /usr/local/etc/dhcp6c.conf ++.Pa /etc/wide-dhcpv6/dhcp6c.conf + .\" + .Sh DESCRIPTION + The +@@ -630,7 +630,7 @@ execute the + .Xr openssl 1 + command (when available) as follows, + .Bd -literal -offset +-% openssl rand -base64 16 ++% openssl rand \-base64 16 + .Ed + .Pp + and copy the output to the +diff --git a/dhcp6ctl.8 b/dhcp6ctl.8 +index 86ea0e1..e11889b 100644 +--- a/dhcp6ctl.8 ++++ b/dhcp6ctl.8 +@@ -85,12 +85,11 @@ Use + .Ar keyfile + to provide the shared secret to communicate with the process. + The default file name used when unspecified is +-.Pa /usr/local/etc/dhcp6cctlkey ++.Pa /etc/wide-dhcpv6/dhcp6cctlkey + with a client, + and +-.Pa /usr/local/etc/dhcp6sctlkey ++.Pa /etc/wide-dhcpv6/dhcp6sctlkey + with a server. +- + .It Fl p Ar port + Specify + .Ar port +@@ -99,7 +98,7 @@ The default port number used when unspecified is 5546 for a client, + and 5547 for a server. + .It Fl s Ar address + Specify +-.A address ++.Ar address + as the listening address of the process. + The default address used when unspecified is ::1. + .El +@@ -183,10 +182,10 @@ information (if any) and exits. + .El + .\" + .Sh FILES +-.Bl -tag -width /usr/local/etc/dhcp6cctlkey -compact +-.It Pa /usr/local/etc/dhcp6cctlkey ++.Bl -tag -width /etc/wide-dhcpv6/dhcp6cctlkey -compact ++.It Pa /etc/wide-dhcpv6/dhcp6cctlkey + is the default key file to communicate with a client. +-.It Pa /usr/local/etc/dhcp6sctlkey ++.It Pa /etc/wide-dhcpv6/dhcp6sctlkey + is the default key file to communicate with a server. + .El + .\" +diff --git a/dhcp6relay.8 b/dhcp6relay.8 +index 4f761b0..7ad8ada 100644 +--- a/dhcp6relay.8 ++++ b/dhcp6relay.8 +@@ -107,7 +107,6 @@ to dump the process ID of + is the default file that contains pid of the currently running + .Nm . + .El +- + .Sh SEE ALSO + .Xr dhcp6c 8 , + .Xr dhcp6s 8 +diff --git a/dhcp6s.8 b/dhcp6s.8 +index 888117a..29dcc7b 100644 +--- a/dhcp6s.8 ++++ b/dhcp6s.8 +@@ -102,7 +102,7 @@ Use + to store the shared secret to authenticate the communication with + .Nm dhcp6ctl . + The default file name used when unspecified is +-.Pa /usr/local/etc/dhcp6sctlkey . ++.Pa /etc/wide-dhcpv6/dhcp6sctlkey . + The default name is intentionally same as that for + .Nm dhcp6ctl + so that the server and the control command can share the file when +@@ -122,12 +122,12 @@ to dump the process ID of + .El + .\" + .Sh FILES +-.Bl -tag -width /usr/local/etc/dhcp6s.conf -compact +-.It Pa /usr/local/etc/dhcp6s.conf ++.Bl -tag -width /etc/wide-dhcpv6/dhcp6s.conf -compact ++.It Pa /etc/wide-dhcpv6/dhcp6s.conf + is the default configuration file. +-.It Pa /var/db/dhcp6s_duid ++.It Pa /var/lib/dhcpv6/dhcp6s_duid + is the default file to store the server's DUID. +-.It Pa /usr/local/etc/dhcp6sctlkey ++.It Pa /etc/wide-dhcpv6/dhcp6sctlkey + is the default key file to communicate with the control command. + See + .Xr dhcp6ctl 8 +diff --git a/dhcp6s.conf.5 b/dhcp6s.conf.5 +index 1206764..2cb08ce 100644 +--- a/dhcp6s.conf.5 ++++ b/dhcp6s.conf.5 +@@ -36,7 +36,7 @@ + .Nd DHCPv6 server configuration file + .\" + .Sh SYNOPSIS +-.Pa /usr/local/etc/dhcp6s.conf ++.Pa /etc/wide-dhcpv6/dhcp6s.conf + .\" + .Sh DESCRIPTION + The +-- +1.5.6.5 + Added: branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0002-Don-t-strip-binaries.patch =================================================================== --- branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0002-Don-t-strip-binaries.patch (rev 0) +++ branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0002-Don-t-strip-binaries.patch 2015-10-27 22:44:42 UTC (rev 7288) @@ -0,0 +1,28 @@ +From 30c43a801bd5b4bb96c878d2efc97042511fea92 Mon Sep 17 00:00:00 2001 +From: Jeremie Corbier <jer...@fa...> +Date: Tue, 6 Apr 2010 15:51:06 +0200 +Subject: [PATCH] Don't strip binaries + +This patch prevents wide-dhcpv6 build system from stripping built binaries. + +Signed-off-by: Jeremie Corbier <je...@fa...> +--- + Makefile.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index a39596f..de25f48 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -103,7 +103,7 @@ $(srcdir)/ianaopts.h: gentab.pl bootp-dhcp-parameters + + install:: + -mkdir -p $(sbindir) $(mandir)/man5 $(mandir)/man8 +- $(INSTALL_PROGRAM) -s -o $(user) -g $(group) $(TARGET) $(sbindir) ++ $(INSTALL_PROGRAM) -o $(user) -g $(group) $(TARGET) $(sbindir) + $(INSTALL_DATA) -o $(user) -g $(group) dhcp6c.8 $(mandir)/man8 + $(INSTALL_DATA) -o $(user) -g $(group) dhcp6s.8 $(mandir)/man8 + $(INSTALL_DATA) -o $(user) -g $(group) dhcp6relay.8 $(mandir)/man8 +-- +1.5.6.5 + Added: branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0003-Close-inherited-file-descriptors.patch =================================================================== --- branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0003-Close-inherited-file-descriptors.patch (rev 0) +++ branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0003-Close-inherited-file-descriptors.patch 2015-10-27 22:44:42 UTC (rev 7288) @@ -0,0 +1,80 @@ +From 2bb6f1769a5c3ea4f669382801c9bb2b74881d48 Mon Sep 17 00:00:00 2001 +From: Jeremie Corbier <jer...@fa...> +Date: Tue, 6 Apr 2010 15:51:08 +0200 +Subject: [PATCH] Close inherited file descriptors + +wide-dhcpv6 binaries should close inherited fds. + +Signed-off-by: Jeremie Corbier <je...@fa...> +--- + dhcp6c.c | 7 ++++++- + dhcp6relay.c | 6 ++++++ + dhcp6s.c | 5 +++++ + 3 files changed, 17 insertions(+), 1 deletions(-) + +diff --git a/dhcp6c.c b/dhcp6c.c +index 1caaaa5..b5f5ed7 100644 +--- a/dhcp6c.c ++++ b/dhcp6c.c +@@ -159,6 +159,7 @@ main(argc, argv) + char *progname; + FILE *pidfp; + struct dhcp6_if *ifp; ++ int fd; + + #ifndef HAVE_ARC4RANDOM + srandom(time(NULL) & getpid()); +@@ -205,8 +206,12 @@ main(argc, argv) + exit(0); + } + +- if (foreground == 0) ++ if (foreground == 0) { ++ for (fd = 3; fd < 1024; fd++) ++ close(fd); ++ + openlog(progname, LOG_NDELAY|LOG_PID, LOG_DAEMON); ++ } + + setloglevel(debug); + +diff --git a/dhcp6relay.c b/dhcp6relay.c +index fb84ce3..eb0bce9 100644 +--- a/dhcp6relay.c ++++ b/dhcp6relay.c +@@ -207,8 +207,14 @@ main(argc, argv) + } + + if (foreground == 0) { ++ int fd; ++ + if (daemon(0, 0) < 0) + err(1, "daemon"); ++ ++ for (fd = 3; fd < 1024; fd++) ++ close(fd); ++ + openlog(progname, LOG_NDELAY|LOG_PID, LOG_DAEMON); + } + setloglevel(debug); +diff --git a/dhcp6s.c b/dhcp6s.c +index 544afff..494e571 100644 +--- a/dhcp6s.c ++++ b/dhcp6s.c +@@ -316,8 +316,13 @@ main(argc, argv) + } + + if (foreground == 0) { ++ int fd; ++ + if (daemon(0, 0) < 0) + err(1, "daemon"); ++ ++ for (fd = 3; fd < 1024; fd++) ++ close(fd); + } + + /* dump current PID */ +-- +1.5.6.5 + Added: branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0004-GNU-libc6-fixes.patch =================================================================== --- branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0004-GNU-libc6-fixes.patch (rev 0) +++ branches/1.0/package/wide-dhcpv6/wide-dhcpv6-0004-GNU-libc6-fixes.patch 2015-10-27 22:44:42 UTC (rev 7288) @@ -0,0 +1,6710 @@ +From 78c2ba34951f378f847aaeb0b82fa6be9014ad46 Mon Sep 17 00:00:00 2001 +From: Jeremie Corbier <jer...@fa...> +Date: Tue, 6 Apr 2010 15:51:10 +0200 +Subject: [PATCH] GNU libc6 fixes + +Fixes for recent libc releases. + +Signed-off-by: Jeremie Corbier <je...@fa...> +--- + addrconf.c | 16 +- + cftoken.c | 12 +- + cftoken.l | 12 +- + common.c | 226 +++++++++++++------------- + common.h | 2 +- + config.c | 268 +++++++++++++++--------------- + configure | 50 ++++++- + configure.in | 7 + + dhcp6.h | 7 + + dhcp6_ctl.c | 40 +++--- + dhcp6c.c | 246 ++++++++++++++-------------- + dhcp6c_ia.c | 86 +++++----- + dhcp6c_script.c | 36 ++-- + dhcp6relay.c | 118 +++++++------- + dhcp6relay_script.c | 28 ++-- + dhcp6s.c | 446 +++++++++++++++++++++++++------------------------- + if.c | 12 +- + lease.c | 14 +- + prefixconf.c | 24 ++-- + timer.c | 6 +- + 20 files changed, 859 insertions(+), 797 deletions(-) + +diff --git a/addrconf.c b/addrconf.c +index d98373f..98d03e5 100644 +--- a/addrconf.c ++++ b/addrconf.c +@@ -122,7 +122,7 @@ update_address(ia, addr, dhcpifp, ctlp, callback) + if (addr->vltime != DHCP6_DURATION_INFINITE && + (addr->pltime == DHCP6_DURATION_INFINITE || + addr->pltime > addr->vltime)) { +- dprintf(LOG_INFO, FNAME, "invalid address %s: " ++ debug_printf(LOG_INFO, FNAME, "invalid address %s: " + "pltime (%lu) is larger than vltime (%lu)", + in6addr2str(&addr->addr, 0), + addr->pltime, addr->vltime); +@@ -131,7 +131,7 @@ update_address(ia, addr, dhcpifp, ctlp, callback) + + if (iac_na == NULL) { + if ((iac_na = malloc(sizeof(*iac_na))) == NULL) { +- dprintf(LOG_NOTICE, FNAME, "memory allocation failed"); ++ debug_printf(LOG_NOTICE, FNAME, "memory allocation failed"); + return (-1); + } + memset(iac_na, 0, sizeof(*iac_na)); +@@ -152,7 +152,7 @@ update_address(ia, addr, dhcpifp, ctlp, callback) + /* search for the given address, and make a new one if it fails */ + if ((sa = find_addr(&iac_na->statefuladdr_head, addr)) == NULL) { + if ((sa = malloc(sizeof(*sa))) == NULL) { +- dprintf(LOG_NOTICE, FNAME, "memory allocation failed"); ++ debug_printf(LOG_NOTICE, FNAME, "memory allocation failed"); + return (-1); + } + memset(sa, 0, sizeof(*sa)); +@@ -169,7 +169,7 @@ update_address(ia, addr, dhcpifp, ctlp, callback) + sa->addr.pltime = addr->pltime; + sa->addr.vltime = addr->vltime; + sa->dhcpif = dhcpifp; +- dprintf(LOG_DEBUG, FNAME, "%s an address %s pltime=%lu, vltime=%lu", ++ debug_printf(LOG_DEBUG, FNAME, "%s an address %s pltime=%lu, vltime=%lu", + sacreate ? "create" : "update", + in6addr2str(&addr->addr, 0), addr->pltime, addr->vltime); + +@@ -194,7 +194,7 @@ update_address(ia, addr, dhcpifp, ctlp, callback) + if (sa->timer == NULL) { + sa->timer = dhcp6_add_timer(addr_timo, sa); + if (sa->timer == NULL) { +- dprintf(LOG_NOTICE, FNAME, ++ debug_printf(LOG_NOTICE, FNAME, + "failed to add stateful addr timer"); + remove_addr(sa); /* XXX */ + return (-1); +@@ -233,7 +233,7 @@ remove_addr(sa) + { + int ret; + +- dprintf(LOG_DEBUG, FNAME, "remove an address %s", ++ debug_printf(LOG_DEBUG, FNAME, "remove an address %s", + in6addr2str(&sa->addr.addr, 0)); + + if (sa->timer) +@@ -343,7 +343,7 @@ na_renew_data_free(evd) + struct dhcp6_list *ial; + + if (evd->type != DHCP6_EVDATA_IANA) { +- dprintf(LOG_ERR, FNAME, "assumption failure"); ++ debug_printf(LOG_ERR, FNAME, "assumption failure"); + exit(1); + } + +@@ -362,7 +362,7 @@ addr_timo(arg) + struct ia *ia; + void (*callback)__P((struct ia *)); + +- dprintf(LOG_DEBUG, FNAME, "address timeout for %s", ++ debug_printf(LOG_DEBUG, FNAME, "address timeout for %s", + in6addr2str(&sa->addr.addr, 0)); + + ia = sa->ctl->iacna_ia; +diff --git a/cftoken.c b/cftoken.c +index fcccc5a..0f6c1bf 100644 +--- a/cftoken.c ++++ b/cftoken.c +@@ -2475,10 +2475,10 @@ cfdebug_print(w, t, l) + int l; + { + if (w) { +- dprintf(LOG_DEBUG, FNAME, ++ debug_printf(LOG_DEBUG, FNAME, + "<%d>%s [%s] (%d)", yy_start, w, t, l); + } else { +- dprintf(LOG_DEBUG, FNAME, ++ debug_printf(LOG_DEBUG, FNAME, + "<%d>[%s] (%d)", yy_start, t, l); + } + } +@@ -2494,7 +2494,7 @@ yyerror0(int level, char *s, va_list ap) + if (bp < ep) + bp += vsnprintf(bp, ep - bp, s, ap); + +- dprintf(level, FNAME, ebuf); ++ debug_printf(level, FNAME, ebuf); + } + + void +@@ -2532,7 +2532,7 @@ cfswitch_buffer(incl) + FILE *fp; + + if (incstackp >= MAX_INCLUDE_DEPTH) { +- dprintf(LOG_ERR, FNAME, "cfparse: includes nested too deeply"); ++ debug_printf(LOG_ERR, FNAME, "cfparse: includes nested too deeply"); + return (-1); + } + incstack[incstackp].path = configfilename; +@@ -2541,7 +2541,7 @@ cfswitch_buffer(incl) + + fp = fopen(path, "r"); + if (fp == NULL) { +- dprintf(LOG_ERR, FNAME, "cfparse: fopen(%s): %s", ++ debug_printf(LOG_ERR, FNAME, "cfparse: fopen(%s): %s", + path, strerror(errno)); + if (errno == ENOENT) + return (0); +@@ -2563,7 +2563,7 @@ cfparse(conf) + { + configfilename = conf; + if ((yyin = fopen(configfilename, "r")) == NULL) { +- dprintf(LOG_ERR, FNAME, "cfparse: fopen(%s): %s", ++ debug_printf(LOG_ERR, FNAME, "cfparse: fopen(%s): %s", + configfilename, strerror(errno)); + if (errno == ENOENT) + return (0); +diff --git a/cftoken.l b/cftoken.l +index ece7fbb..ad4128d 100644 +--- a/cftoken.l ++++ b/cftoken.l +@@ -340,10 +340,10 @@ cfdebug_print(w, t, l) + int l; + { + if (w) { +- dprintf(LOG_DEBUG, FNAME, ++ debug_printf(LOG_DEBUG, FNAME, + "<%d>%s [%s] (%d)", yy_start, w, t, l); + } else { +- dprintf(LOG_DEBUG, FNAME, ++ debug_printf(LOG_DEBUG, FNAME, + "<%d>[%s] (%d)", yy_start, t, l); + } + } +@@ -359,7 +359,7 @@ yyerror0(int level, char *s, va_list ap) + if (bp < ep) + bp += vsnprintf(bp, ep - bp, s, ap); + +- dprintf(level, FNAME, ebuf); ++ debug_printf(level, FNAME, ebuf); + } + + void +@@ -397,7 +397,7 @@ cfswitch_buffer(incl) + FILE *fp; + + if (incstackp >= MAX_INCLUDE_DEPTH) { +- dprintf(LOG_ERR, FNAME, "cfparse: includes nested too deeply"); ++ debug_printf(LOG_ERR, FNAME, "cfparse: includes nested too deeply"); + return (-1); + } + incstack[incstackp].path = configfilename; +@@ -406,7 +406,7 @@ cfswitch_buffer(incl) + + fp = fopen(path, "r"); + if (fp == NULL) { +- dprintf(LOG_ERR, FNAME, "cfparse: fopen(%s): %s", ++ debug_printf(LOG_ERR, FNAME, "cfparse: fopen(%s): %s", + path, strerror(errno)); + if (errno == ENOENT) + return (0); +@@ -428,7 +428,7 @@ cfparse(conf) + { + configfilename = conf; + if ((yyin = fopen(configfilename, "r")) == NULL) { +- dprintf(LOG_ERR, FNAME, "cfparse: fopen(%s): %s", ++ debug_printf(LOG_ERR, FNAME, "cfparse: fopen(%s): %s", + configfilename, strerror(errno)); + if (errno == ENOENT) + return (0); +diff --git a/common.c b/common.c +index f35399c..cc4abcc 100644 +--- a/common.c ++++ b/common.c +@@ -265,7 +265,7 @@ dhcp6_add_listval(head, type, val, sublist) + struct dhcp6_listval *lv = NULL; + + if ((lv = malloc(sizeof(*lv))) == NULL) { +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "failed to allocate memory for list entry"); + goto fail; + } +@@ -298,7 +298,7 @@ dhcp6_add_listval(head, type, val, sublist) + goto fail; + break; + default: +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "unexpected list value type (%d)", type); + goto fail; + } +@@ -361,7 +361,7 @@ dhcp6_get_addr(optlen, cp, type, list) + void *val; + + if (optlen % sizeof(struct in6_addr) || optlen == 0) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "malformed DHCP option: type %d, len %d", type, optlen); + return -1; + } +@@ -371,14 +371,14 @@ dhcp6_get_addr(optlen, cp, type, list) + memcpy(&valaddr, val, sizeof(valaddr)); + if (dhcp6_find_listval(list, + DHCP6_LISTVAL_ADDR6, &valaddr, 0)) { +- dprintf(LOG_INFO, FNAME, "duplicated %s address (%s)", ++ debug_printf(LOG_INFO, FNAME, "duplicated %s address (%s)", + dhcp6optstr(type), in6addr2str(&valaddr, 0)); + continue; + } + + if (dhcp6_add_listval(list, DHCP6_LISTVAL_ADDR6, + &valaddr, NULL) == NULL) { +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "failed to copy %s address", dhcp6optstr(type)); + return -1; + } +@@ -405,7 +405,7 @@ dhcp6_set_addr(type, list, p, optep, len) + tmpbuf = NULL; + optlen = dhcp6_count_list(list) * sizeof(struct in6_addr); + if ((tmpbuf = malloc(optlen)) == NULL) { +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "memory allocation failed for %s options", + dhcp6optstr(type)); + return -1; +@@ -438,10 +438,10 @@ dhcp6_get_domain(optlen, cp, type, list) + + if (dnsdecode((u_char **)(void *)&val, + (u_char *)(cp + optlen), name, sizeof(name)) == NULL) { +- dprintf(LOG_INFO, FNAME, "failed to " ++ debug_printf(LOG_INFO, FNAME, "failed to " + "decode a %s domain name", + dhcp6optstr(type)); +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "malformed DHCP option: type %d, len %d", + type, optlen); + return -1; +@@ -452,7 +452,7 @@ dhcp6_get_domain(optlen, cp, type, list) + + if (dhcp6_add_listval(list, + DHCP6_LISTVAL_VBUF, &vb, NULL) == NULL) { +- dprintf(LOG_ERR, FNAME, "failed to " ++ debug_printf(LOG_ERR, FNAME, "failed to " + "copy a %s domain name", dhcp6optstr(type)); + return -1; + } +@@ -485,7 +485,7 @@ dhcp6_set_domain(type, list, p, optep, len) + + tmpbuf = NULL; + if ((tmpbuf = malloc(optlen)) == NULL) { +- dprintf(LOG_ERR, FNAME, "memory allocation failed for " ++ debug_printf(LOG_ERR, FNAME, "memory allocation failed for " + "%s domain options", dhcp6optstr(type)); + return -1; + } +@@ -497,14 +497,14 @@ dhcp6_set_domain(type, list, p, optep, len) + nlen = dnsencode((const char *)d->val_vbuf.dv_buf, + name, sizeof (name)); + if (nlen < 0) { +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "failed to encode a %s domain name", + dhcp6optstr(type)); + free(tmpbuf); + return -1; + } + if (ep - cp < nlen) { +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "buffer length for %s domain name is too short", + dhcp6optstr(type)); + free(tmpbuf); +@@ -530,7 +530,7 @@ dhcp6_create_event(ifp, state) + struct dhcp6_event *ev; + + if ((ev = malloc(sizeof(*ev))) == NULL) { +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "failed to allocate memory for an event"); + return (NULL); + } +@@ -548,7 +548,7 @@ dhcp6_remove_event(ev) + { + struct dhcp6_serverinfo *sp, *sp_next; + +- dprintf(LOG_DEBUG, FNAME, "removing an event on %s, state=%s", ++ debug_printf(LOG_DEBUG, FNAME, "removing an event on %s, state=%s", + ev->ifp->ifname, dhcp6_event_statestr(ev)); + + dhcp6_remove_evdata(ev); +@@ -562,7 +562,7 @@ dhcp6_remove_event(ev) + for (sp = ev->servers; sp; sp = sp_next) { + sp_next = sp->next; + +- dprintf(LOG_DEBUG, FNAME, "removing server (ID: %s)", ++ debug_printf(LOG_DEBUG, FNAME, "removing server (ID: %s)", + duidstr(&sp->optinfo.serverID)); + dhcp6_clear_options(&sp->optinfo); + if (sp->authparam != NULL) +@@ -649,14 +649,14 @@ dhcp6_auth_replaycheck(method, prev, current) + char bufcurrent[] = "ffff ffff ffff ffff"; + + if (method != DHCP6_AUTHRDM_MONOCOUNTER) { +- dprintf(LOG_ERR, FNAME, "unsupported replay detection " ++ debug_printf(LOG_ERR, FNAME, "unsupported replay detection " + "method (%d)", method); + return (-1); + } + + (void)sprint_uint64(bufprev, sizeof(bufprev), prev); + (void)sprint_uint64(bufcurrent, sizeof(bufcurrent), current); +- dprintf(LOG_DEBUG, FNAME, "previous: %s, current: %s", ++ debug_printf(LOG_DEBUG, FNAME, "previous: %s, current: %s", + bufprev, bufcurrent); + + prev = ntohq(prev); +@@ -667,7 +667,7 @@ dhcp6_auth_replaycheck(method, prev, current) + * whether the serial number is increasing or not. + */ + if (prev == (current ^ 0x8000000000000000ULL)) { +- dprintf(LOG_INFO, FNAME, "detected a singular point"); ++ debug_printf(LOG_INFO, FNAME, "detected a singular point"); + return (1); + } + +@@ -688,7 +688,7 @@ getifaddr(addr, ifnam, prefix, plen, strong, ignoreflags) + int error = -1; + + if (getifaddrs(&ifap) != 0) { +- dprintf(LOG_WARNING, FNAME, ++ debug_printf(LOG_WARNING, FNAME, + "getifaddrs failed: %s", strerror(errno)); + return (-1); + } +@@ -765,7 +765,7 @@ getifidfromaddr(addr, ifidp) + int retval = -1; + + if (getifaddrs(&ifap) != 0) { +- dprintf(LOG_WARNING, FNAME, ++ debug_printf(LOG_WARNING, FNAME, + "getifaddrs failed: %s", strerror(errno)); + return (-1); + } +@@ -781,7 +781,7 @@ getifidfromaddr(addr, ifidp) + + if (ifa != NULL) { + if ((ifid = if_nametoindex(ifa->ifa_name)) == 0) { +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "if_nametoindex failed for %s", ifa->ifa_name); + goto end; + } +@@ -999,20 +999,20 @@ get_duid(idfile, duid) + char tmpbuf[256]; /* DUID should be no more than 256 bytes */ + + if ((fp = fopen(idfile, "r")) == NULL && errno != ENOENT) +- dprintf(LOG_NOTICE, FNAME, "failed to open DUID file: %s", ++ debug_printf(LOG_NOTICE, FNAME, "failed to open DUID file: %s", + idfile); + + if (fp) { + /* decode length */ + if (fread(&len, sizeof(len), 1, fp) != 1) { +- dprintf(LOG_ERR, FNAME, "DUID file corrupted"); ++ debug_printf(LOG_ERR, FNAME, "DUID file corrupted"); + goto fail; + } + } else { + int l; + + if ((l = gethwid(tmpbuf, sizeof(tmpbuf), NULL, &hwtype)) < 0) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "failed to get a hardware address"); + goto fail; + } +@@ -1022,18 +1022,18 @@ get_duid(idfile, duid) + memset(duid, 0, sizeof(*duid)); + duid->duid_len = len; + if ((duid->duid_id = (char *)malloc(len)) == NULL) { +- dprintf(LOG_ERR, FNAME, "failed to allocate memory"); ++ debug_printf(LOG_ERR, FNAME, "failed to allocate memory"); + goto fail; + } + + /* copy (and fill) the ID */ + if (fp) { + if (fread(duid->duid_id, len, 1, fp) != 1) { +- dprintf(LOG_ERR, FNAME, "DUID file corrupted"); ++ debug_printf(LOG_ERR, FNAME, "DUID file corrupted"); + goto fail; + } + +- dprintf(LOG_DEBUG, FNAME, ++ debug_printf(LOG_DEBUG, FNAME, + "extracted an existing DUID from %s: %s", + idfile, duidstr(duid)); + } else { +@@ -1047,27 +1047,27 @@ get_duid(idfile, duid) + dp->dh6_duid1_time = htonl((u_long)(t64 & 0xffffffff)); + memcpy((void *)(dp + 1), tmpbuf, (len - sizeof(*dp))); + +- dprintf(LOG_DEBUG, FNAME, "generated a new DUID: %s", ++ debug_printf(LOG_DEBUG, FNAME, "generated a new DUID: %s", + duidstr(duid)); + } + + /* save the (new) ID to the file for next time */ + if (!fp) { + if ((fp = fopen(idfile, "w+")) == NULL) { +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "failed to open DUID file for save"); + goto fail; + } + if ((fwrite(&len, sizeof(len), 1, fp)) != 1) { +- dprintf(LOG_ERR, FNAME, "failed to save DUID"); ++ debug_printf(LOG_ERR, FNAME, "failed to save DUID"); + goto fail; + } + if ((fwrite(duid->duid_id, len, 1, fp)) != 1) { +- dprintf(LOG_ERR, FNAME, "failed to save DUID"); ++ debug_printf(LOG_ERR, FNAME, "failed to save DUID"); + goto fail; + } + +- dprintf(LOG_DEBUG, FNAME, "saved generated DUID to %s", ++ debug_printf(LOG_DEBUG, FNAME, "saved generated DUID to %s", + idfile); + } + +@@ -1104,7 +1104,7 @@ getifhwaddr(const char *ifname, char *buf, u_int16_t *hwtypep, int ppa) + dl_phys_addr_req_t dlpar; + dl_phys_addr_ack_t *dlpaa; + +- dprintf(LOG_DEBUG, FNAME, "trying %s ppa %d", ifname, ppa); ++ debug_printf(LOG_DEBUG, FNAME, "trying %s ppa %d", ifname, ppa); + + if (ifname[0] == '\0') + return (-1); +@@ -1239,7 +1239,7 @@ gethwid(buf, len, ifname, hwtypep) + + if ((root = di_init("/", DINFOSUBTREE | DINFOMINOR | + DINFOPROP)) == DI_NODE_NIL) { +- dprintf(LOG_INFO, FNAME, "di_init failed"); ++ debug_printf(LOG_INFO, FNAME, "di_init failed"); + return (-1); + } + parms.buf = buf; +@@ -1283,7 +1283,7 @@ gethwid(buf, len, ifname, hwtypep) + default: + continue; /* XXX */ + } +- dprintf(LOG_DEBUG, FNAME, "found an interface %s for DUID", ++ debug_printf(LOG_DEBUG, FNAME, "found an interface %s for DUID", + ifa->ifa_name); + memcpy(buf, LLADDR(sdl), sdl->sdl_alen); + l = sdl->sdl_alen; /* sdl will soon be freed */ +@@ -1296,7 +1296,7 @@ gethwid(buf, len, ifname, hwtypep) + if (sll->sll_hatype != ARPHRD_ETHER) + continue; + *hwtypep = ARPHRD_ETHER; +- dprintf(LOG_DEBUG, FNAME, "found an interface %s for DUID", ++ debug_printf(LOG_DEBUG, FNAME, "found an interface %s for DUID", + ifa->ifa_name); + memcpy(buf, sll->sll_addr, sll->sll_halen); + l = sll->sll_halen; /* sll will soon be freed */ +@@ -1512,12 +1512,12 @@ dhcp6_get_options(p, ep, optinfo) + cp = (char *)(p + 1); + np = (struct dhcp6opt *)(cp + optlen); + +- dprintf(LOG_DEBUG, FNAME, "get DHCP option %s, len %d", ++ debug_printf(LOG_DEBUG, FNAME, "get DHCP option %s, len %d", + dhcp6optstr(opt), optlen); + + /* option length field overrun */ + if (np > ep) { +- dprintf(LOG_INFO, FNAME, "malformed DHCP options"); ++ debug_printf(LOG_INFO, FNAME, "malformed DHCP options"); + goto fail; + } + +@@ -1527,10 +1527,10 @@ dhcp6_get_options(p, ep, optinfo) + goto malformed; + duid0.duid_len = optlen; + duid0.duid_id = cp; +- dprintf(LOG_DEBUG, "", ++ debug_printf(LOG_DEBUG, "", + " DUID: %s", duidstr(&duid0)); + if (duidcpy(&optinfo->clientID, &duid0)) { +- dprintf(LOG_ERR, FNAME, "failed to copy DUID"); ++ debug_printf(LOG_ERR, FNAME, "failed to copy DUID"); + goto fail; + } + break; +@@ -1539,9 +1539,9 @@ dhcp6_get_options(p, ep, optinfo) + goto malformed; + duid0.duid_len = optlen; + duid0.duid_id = cp; +- dprintf(LOG_DEBUG, "", " DUID: %s", duidstr(&duid0)); ++ debug_printf(LOG_DEBUG, "", " DUID: %s", duidstr(&duid0)); + if (duidcpy(&optinfo->serverID, &duid0)) { +- dprintf(LOG_ERR, FNAME, "failed to copy DUID"); ++ debug_printf(LOG_ERR, FNAME, "failed to copy DUID"); + goto fail; + } + break; +@@ -1550,14 +1550,14 @@ dhcp6_get_options(p, ep, optinfo) + goto malformed; + memcpy(&val16, cp, sizeof(val16)); + num16 = ntohs(val16); +- dprintf(LOG_DEBUG, "", " status code: %s", ++ debug_printf(LOG_DEBUG, "", " status code: %s", + dhcp6_stcodestr(num16)); + + /* need to check duplication? */ + + if (dhcp6_add_listval(&optinfo->stcode_list, + DHCP6_LISTVAL_STCODE, &num16, NULL) == NULL) { +- dprintf(LOG_ERR, FNAME, "failed to copy " ++ debug_printf(LOG_ERR, FNAME, "failed to copy " + "status code"); + goto fail; + } +@@ -1574,13 +1574,13 @@ dhcp6_get_options(p, ep, optinfo) + memcpy(&opttype, val, sizeof(u_int16_t)); + num = (int)ntohs(opttype); + +- dprintf(LOG_DEBUG, "", ++ debug_printf(LOG_DEBUG, "", + " requested option: %s", + dhcp6optstr(num)); + + if (dhcp6_find_listval(&optinfo->reqopt_list, + DHCP6_LISTVAL_NUM, &num, 0)) { +- dprintf(LOG_INFO, FNAME, "duplicated " ++ debug_printf(LOG_INFO, FNAME, "duplicated " + "option type (%s)", + dhcp6optstr(opttype)); + goto nextoption; +@@ -1588,7 +1588,7 @@ dhcp6_get_options(p, ep, optinfo) + + if (dhcp6_add_listval(&optinfo->reqopt_list, + DHCP6_LISTVAL_NUM, &num, NULL) == NULL) { +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "failed to copy requested option"); + goto fail; + } +@@ -1599,10 +1599,10 @@ dhcp6_get_options(p, ep, optinfo) + case DH6OPT_PREFERENCE: + if (optlen != 1) + goto malformed; +- dprintf(LOG_DEBUG, "", " preference: %d", ++ debug_printf(LOG_DEBUG, "", " preference: %d", + (int)*(u_char *)cp); + if (optinfo->pref != DH6OPT_PREF_UNDEF) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "duplicated preference option"); + } else + optinfo->pref = (int)*(u_char *)cp; +@@ -1612,11 +1612,11 @@ dhcp6_get_options(p, ep, optinfo) + goto malformed; + memcpy(&val16, cp, sizeof(val16)); + val16 = ntohs(val16); +- dprintf(LOG_DEBUG, "", " elapsed time: %lu", ++ debug_printf(LOG_DEBUG, "", " elapsed time: %lu", + (u_int32_t)val16); + if (optinfo->elapsed_time != + DH6OPT_ELAPSED_TIME_UNDEF) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "duplicated elapsed time option"); + } else + optinfo->elapsed_time = val16; +@@ -1637,7 +1637,7 @@ dhcp6_get_options(p, ep, optinfo) + * [RFC3315 Section 21.4.2] + */ + if (optinfo->authproto != DHCP6_AUTHPROTO_UNDEF) { +- dprintf(LOG_INFO, FNAME, "found more than one " ++ debug_printf(LOG_INFO, FNAME, "found more than one " + "authentication option"); + goto fail; + } +@@ -1648,7 +1648,7 @@ dhcp6_get_options(p, ep, optinfo) + memcpy(&optinfo->authrd, cp, sizeof(optinfo->authrd)); + cp += sizeof(optinfo->authrd); + +- dprintf(LOG_DEBUG, "", " %s", sprint_auth(optinfo)); ++ debug_printf(LOG_DEBUG, "", " %s", sprint_auth(optinfo)); + + authinfolen = + optlen - (sizeof(struct dhcp6opt_auth) - 4); +@@ -1670,7 +1670,7 @@ dhcp6_get_options(p, ep, optinfo) + optinfo->delayedauth_realmval = + malloc(optinfo->delayedauth_realmlen); + if (optinfo->delayedauth_realmval == NULL) { +- dprintf(LOG_WARNING, FNAME, "failed " ++ debug_printf(LOG_WARNING, FNAME, "failed " + "allocate memory for auth realm"); + goto fail; + } +@@ -1687,7 +1687,7 @@ dhcp6_get_options(p, ep, optinfo) + optinfo->delayedauth_offset = cp - bp; + cp += 16; + +- dprintf(LOG_DEBUG, "", " auth key ID: %x, " ++ debug_printf(LOG_DEBUG, "", " auth key ID: %x, " + "offset=%d, realmlen=%d", + optinfo->delayedauth_keyid, + optinfo->delayedauth_offset, +@@ -1698,7 +1698,7 @@ dhcp6_get_options(p, ep, optinfo) + break; + #endif + default: +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "unsupported authentication protocol: %d", + *cp); + goto fail; +@@ -1779,14 +1779,14 @@ dhcp6_get_options(p, ep, optinfo) + ia.t1 = ntohl(optia.dh6_ia_t1); + ia.t2 = ntohl(optia.dh6_ia_t2); + +- dprintf(LOG_DEBUG, "", ++ debug_printf(LOG_DEBUG, "", + " IA_PD: ID=%lu, T1=%lu, T2=%lu", + ia.iaid, ia.t1, ia.t2); + + /* duplication check */ + if (dhcp6_find_listval(&optinfo->iapd_list, + DHCP6_LISTVAL_IAPD, &ia, 0)) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "duplicated IA_PD %lu", ia.iaid); + break; /* ignore this IA_PD */ + } +@@ -1813,7 +1813,7 @@ dhcp6_get_options(p, ep, optinfo) + goto malformed; + memcpy(&val32, cp, sizeof(val32)); + val32 = ntohl(val32); +- dprintf(LOG_DEBUG, "", ++ debug_printf(LOG_DEBUG, "", + " information refresh time: %lu", val32); + if (val32 < DHCP6_IRT_MINIMUM) { + /* +@@ -1823,13 +1823,13 @@ dhcp6_get_options(p, ep, optinfo) + * [draft-ietf-dhc-lifetime-02.txt, + * Section 3.2] + */ +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "refresh time is too small (%d), adjusted", + val32); + val32 = DHCP6_IRT_MINIMUM; + } + if (optinfo->refreshtime != DH6OPT_REFRESHTIME_UNDEF) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "duplicated refresh time option"); + } else + optinfo->refreshtime = (int64_t)val32; +@@ -1843,14 +1843,14 @@ dhcp6_get_options(p, ep, optinfo) + ia.t1 = ntohl(optia.dh6_ia_t1); + ia.t2 = ntohl(optia.dh6_ia_t2); + +- dprintf(LOG_DEBUG, "", ++ debug_printf(LOG_DEBUG, "", + " IA_NA: ID=%lu, T1=%lu, T2=%lu", + ia.iaid, ia.t1, ia.t2); + + /* duplication check */ + if (dhcp6_find_listval(&optinfo->iana_list, + DHCP6_LISTVAL_IANA, &ia, 0)) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "duplicated IA_NA %lu", ia.iaid); + break; /* ignore this IA_NA */ + } +@@ -1874,7 +1874,7 @@ dhcp6_get_options(p, ep, optinfo) + break; + default: + /* no option specific behavior */ +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "unknown or unexpected DHCP6 option %s, len %d", + dhcp6optstr(opt), optlen); + break; +@@ -1884,7 +1884,7 @@ dhcp6_get_options(p, ep, optinfo) + return (0); + + malformed: +- dprintf(LOG_INFO, FNAME, "malformed DHCP option: type %d, len %d", ++ debug_printf(LOG_INFO, FNAME, "malformed DHCP option: type %d, len %d", + opt, optlen); + fail: + dhcp6_clear_options(optinfo); +@@ -1967,11 +1967,11 @@ copyin_option(type, p, ep, list) + cp = (char *)(p + 1); + np = (struct dhcp6opt *)(cp + optlen); + +- dprintf(LOG_DEBUG, FNAME, "get DHCP option %s, len %d", ++ debug_printf(LOG_DEBUG, FNAME, "get DHCP option %s, len %d", + dhcp6optstr(opt), optlen); + + if (np > ep) { +- dprintf(LOG_INFO, FNAME, "malformed DHCP option"); ++ debug_printf(LOG_INFO, FNAME, "malformed DHCP option"); + goto fail; + } + +@@ -1979,7 +1979,7 @@ copyin_option(type, p, ep, list) + case DH6OPT_IA_PD_PREFIX: + /* check option context */ + if (type != DH6OPT_IA_PD) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "%s is an invalid position for %s", + dhcp6optstr(type), dhcp6optstr(opt)); + goto fail; +@@ -1991,7 +1991,7 @@ copyin_option(type, p, ep, list) + /* copy and convert option values */ + memcpy(&opt_iapd_prefix, p, sizeof(opt_iapd_prefix)); + if (opt_iapd_prefix.dh6_iapd_prefix_prefix_len > 128) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "invalid prefix length (%d)", + opt_iapd_prefix.dh6_iapd_prefix_prefix_len); + goto malformed; +@@ -2006,7 +2006,7 @@ copyin_option(type, p, ep, list) + /* clear padding bits in the prefix address */ + prefix6_mask(&iapd_prefix.addr, iapd_prefix.plen); + +- dprintf(LOG_DEBUG, FNAME, " IA_PD prefix: " ++ debug_printf(LOG_DEBUG, FNAME, " IA_PD prefix: " + "%s/%d pltime=%lu vltime=%lu", + in6addr2str(&iapd_prefix.addr, 0), + iapd_prefix.plen, +@@ -2014,7 +2014,7 @@ copyin_option(type, p, ep, list) + + if (dhcp6_find_listval(list, DHCP6_LISTVAL_PREFIX6, + &iapd_prefix, 0)) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "duplicated IA_PD prefix " + "%s/%d pltime=%lu vltime=%lu", + in6addr2str(&iapd_prefix.addr, 0), +@@ -2041,7 +2041,7 @@ copyin_option(type, p, ep, list) + case DH6OPT_IAADDR: + /* check option context */ + if (type != DH6OPT_IA_NA) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "%s is an invalid position for %s", + dhcp6optstr(type), dhcp6optstr(opt)); + goto fail; +@@ -2057,14 +2057,14 @@ copyin_option(type, p, ep, list) + memcpy(&ia_addr.addr, &opt_ia_addr.dh6_ia_addr_addr, + sizeof(ia_addr.addr)); + +- dprintf(LOG_DEBUG, FNAME, " IA_NA address: " ++ debug_printf(LOG_DEBUG, FNAME, " IA_NA address: " + "%s pltime=%lu vltime=%lu", + in6addr2str(&ia_addr.addr, 0), + ia_addr.pltime, ia_addr.vltime); + + if (dhcp6_find_listval(list, + DHCP6_LISTVAL_STATEFULADDR6, &ia_addr, 0)) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "duplicated IA_NA address" + "%s pltime=%lu vltime=%lu", + in6addr2str(&ia_addr.addr, 0), +@@ -2093,7 +2093,7 @@ copyin_option(type, p, ep, list) + type != DH6OPT_IA_PD_PREFIX && + type != DH6OPT_IA_NA && + type != DH6OPT_IAADDR) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "%s is an invalid position for %s", + dhcp6optstr(type), dhcp6optstr(opt)); + goto nextoption; /* or discard the message? */ +@@ -2107,13 +2107,13 @@ copyin_option(type, p, ep, list) + opt_stcode.dh6_stcode_code = + ntohs(opt_stcode.dh6_stcode_code); + +- dprintf(LOG_DEBUG, "", " status code: %s", ++ debug_printf(LOG_DEBUG, "", " status code: %s", + dhcp6_stcodestr(opt_stcode.dh6_stcode_code)); + + /* duplication check */ + if (dhcp6_find_listval(list, DHCP6_LISTVAL_STCODE, + &opt_stcode.dh6_stcode_code, 0)) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "duplicated status code (%d)", + opt_stcode.dh6_stcode_code); + goto nextoption; +@@ -2133,7 +2133,7 @@ copyin_option(type, p, ep, list) + return (0); + + malformed: +- dprintf(LOG_INFO, "", " malformed DHCP option: type %d", opt); ++ debug_printf(LOG_INFO, "", " malformed DHCP option: type %d", opt); + + fail: + dhcp6_clear_list(&sublist); +@@ -2221,7 +2221,7 @@ copy_option(type, len, val, optp, ep, totallenp) + struct dhcp6opt *opt = *optp, opth; + + if ((void *)ep - (void *)optp < len + sizeof(struct dhcp6opt)) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "option buffer short for %s", dhcp6optstr(type)); + return (-1); + } +@@ -2233,7 +2233,7 @@ copy_option(type, len, val, optp, ep, totallenp) + + *optp = (struct dhcp6opt *)((char *)(opt + 1) + len); + *totallenp += sizeof(struct dhcp6opt) + len; +- dprintf(LOG_DEBUG, FNAME, "set %s (len %d)", dhcp6optstr(type), len); ++ debug_printf(LOG_DEBUG, FNAME, "set %s (len %d)", dhcp6optstr(type), len); + + return (0); + } +@@ -2269,21 +2269,21 @@ dhcp6_set_options(type, optbp, optep, optinfo) + + tmpbuf = NULL; + if ((optlen = copyout_option(NULL, NULL, op)) < 0) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "failed to count option length"); + goto fail; + } + if ((void *)optep - (void *)p < optlen) { +- dprintf(LOG_INFO, FNAME, "short buffer"); ++ debug_printf(LOG_INFO, FNAME, "short buffer"); + goto fail; + } + if ((tmpbuf = malloc(optlen)) == NULL) { +- dprintf(LOG_NOTICE, FNAME, ++ debug_printf(LOG_NOTICE, FNAME, + "memory allocation failed for IA_NA options"); + goto fail; + } + if (copyout_option(tmpbuf, tmpbuf + optlen, op) < 0) { +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "failed to construct an IA_NA option"); + goto fail; + } +@@ -2340,7 +2340,7 @@ dhcp6_set_options(type, optbp, optep, optinfo) + buflen = dhcp6_count_list(&optinfo->reqopt_list) * + sizeof(u_int16_t); + if ((tmpbuf = malloc(buflen)) == NULL) { +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "memory allocation failed for options"); + goto fail; + } +@@ -2355,7 +2355,7 @@ dhcp6_set_options(type, optbp, optep, optinfo) + */ + if (opt->val_num == DH6OPT_REFRESHTIME && + type != DH6_INFORM_REQ) { +- dprintf(LOG_DEBUG, FNAME, ++ debug_printf(LOG_DEBUG, FNAME, + "refresh time option is not requested " + "for %s", dhcp6msgstr(type)); + } +@@ -2423,21 +2423,21 @@ dhcp6_set_options(type, optbp, optep, optinfo) + + tmpbuf = NULL; + if ((optlen = copyout_option(NULL, NULL, op)) < 0) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "failed to count option length"); + goto fail; + } + if ((void *)optep - (void *)p < optlen) { +- dprintf(LOG_INFO, FNAME, "short buffer"); ++ debug_printf(LOG_INFO, FNAME, "short buffer"); + goto fail; + } + if ((tmpbuf = malloc(optlen)) == NULL) { +- dprintf(LOG_NOTICE, FNAME, ++ debug_printf(LOG_NOTICE, FNAME, + "memory allocation failed for IA_PD options"); + goto fail; + } + if (copyout_option(tmpbuf, tmpbuf + optlen, op) < 0) { +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "failed to construct an IA_PD option"); + goto fail; + } +@@ -2492,13 +2492,13 @@ dhcp6_set_options(type, optbp, optep, optinfo) + break; + #endif + default: +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "unexpected authentication protocol"); + goto fail; + } + } + if ((auth = malloc(authlen)) == NULL) { +- dprintf(LOG_WARNING, FNAME, "failed to allocate " ++ debug_printf(LOG_WARNING, FNAME, "failed to allocate " + "memory for authentication information"); + goto fail; + } +@@ -2534,7 +2534,7 @@ dhcp6_set_options(type, optbp, optep, optinfo) + optinfo->delayedauth_offset = + ((char *)p - (char *)optbp) + authlen - 16; + +- dprintf(LOG_DEBUG, FNAME, ++ debug_printf(LOG_DEBUG, FNAME, + "key ID %x, offset %d", + optinfo->delayedauth_keyid, + optinfo->delayedauth_offset); +@@ -2543,7 +2543,7 @@ dhcp6_set_options(type, optbp, optep, optinfo) + case DHCP6_AUTHPROTO_RECONFIG: + #endif + default: +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "unexpected authentication protocol"); + free(auth); + goto fail; +@@ -2695,7 +2695,7 @@ copyout_option(p, ep, optval) + * we encounter an unknown option. this should be an internal + * error. + */ +- dprintf(LOG_ERR, FNAME, "unknown option: code %d", ++ debug_printf(LOG_ERR, FNAME, "unknown option: code %d", + optval->type); + return (-1); + } +@@ -2721,7 +2721,7 @@ copyout_option(p, ep, optval) + if (!p) + return(optlen); + +- dprintf(LOG_DEBUG, FNAME, "set %s", dhcp6optstr(opttype)); ++ debug_printf(LOG_DEBUG, FNAME, "set %s", dhcp6optstr(opttype)); + if (ep - p < headlen) /* check it just in case */ + return (-1); + +@@ -2812,7 +2812,7 @@ dhcp6_set_timeoparam(ev) + ev->max_retrans_cnt = REL_MAX_RC; + break; + default: +- dprintf(LOG_ERR, FNAME, "unexpected event state %d on %s", ++ debug_printf(LOG_ERR, FNAME, "unexpected event state %d on %s", + ev->state, ev->ifp->ifname); + exit(1); + } +@@ -2870,7 +2870,7 @@ dhcp6_reset_timer(ev) + + statestr = dhcp6_event_statestr(ev); + +- dprintf(LOG_DEBUG, FNAME, "reset a timer on %s, " ++ debug_printf(LOG_DEBUG, FNAME, "reset a timer on %s, " + "state=%s, timeo=%d, retrans=%d", + ev->ifp->ifname, statestr, ev->timeouts, ev->retrans); + } +@@ -2881,7 +2881,7 @@ duidcpy(dd, ds) + { + dd->duid_len = ds->duid_len; + if ((dd->duid_id = malloc(dd->duid_len)) == NULL) { +- dprintf(LOG_ERR, FNAME, "memory allocation failed"); ++ debug_printf(LOG_ERR, FNAME, "memory allocation failed"); + return (-1); + } + memcpy(dd->duid_id, ds->duid_id, dd->duid_len); +@@ -2929,17 +2929,17 @@ get_rdvalue(rdm, rdvalue, rdsize) + u_int32_t u32, l32; + + if (rdm != DHCP6_AUTHRDM_MONOCOUNTER) { +- dprintf(LOG_INFO, FNAME, "unsupported RDM (%d)", rdm); ++ debug_printf(LOG_INFO, FNAME, "unsupported RDM (%d)", rdm); + return (-1); + } + if (rdsize != sizeof(u_int64_t)) { +- dprintf(LOG_INFO, FNAME, "unsupported RD size (%d)", rdsize); ++ debug_printf(LOG_INFO, FNAME, "unsupported RD size (%d)", rdsize); + return (-1); + } + + #if defined(HAVE_CLOCK_GETTIME) + if (clock_gettime(CLOCK_REALTIME, &tp)) { +- dprintf(LOG_WARNING, FNAME, "clock_gettime failed: %s", ++ debug_printf(LOG_WARNING, FNAME, "clock_gettime failed: %s", + strerror(errno)); + return (-1); + } +@@ -2952,7 +2952,7 @@ get_rdvalue(rdm, rdvalue, rdsize) + l32 = (u_int32_t)nsec; + #else + if (gettimeofday(&tv, NULL) != 0) { +- dprintf(LOG_WARNING, FNAME, "gettimeofday failed: %s", ++ debug_printf(LOG_WARNING, FNAME, "gettimeofday failed: %s", + strerror(errno)); + return (-1); + } +@@ -3207,7 +3207,7 @@ setloglevel(debuglevel) + } + + void +-dprintf(int level, const char *fname, const char *fmt, ...) ++debug_printf(int level, const char *fname, const char *fmt, ...) + { + va_list ap; + char logbuf[LINE_MAX]; +@@ -3293,7 +3293,7 @@ ifaddrconf(cmd, ifname, addr, plen, pltime, vltime) + } + + if ((s = socket(PF_INET6, SOCK_DGRAM, IPPROTO_UDP)) < 0) { +- dprintf(LOG_ERR, FNAME, "can't open a temporary socket: %s", ++ debug_printf(LOG_ERR, FNAME, "can't open a temporary socket: %s", + strerror(errno)); + return (-1); + } +@@ -3311,7 +3311,7 @@ ifaddrconf(cmd, ifname, addr, plen, pltime, vltime) + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); + if (ioctl(s, SIOGIFINDEX, &ifr) < 0) { +- dprintf(LOG_NOTICE, FNAME, "failed to get the index of %s: %s", ++ debug_printf(LOG_NOTICE, FNAME, "failed to get the index of %s: %s", + ifname, strerror(errno)); + close(s); + return (-1); +@@ -3325,7 +3325,7 @@ ifaddrconf(cmd, ifname, addr, plen, pltime, vltime) + #endif + + if (ioctl(s, ioctl_cmd, &req)) { +- dprintf(LOG_NOTICE, FNAME, "failed to %s an address on %s: %s", ++ debug_printf(LOG_NOTICE, FNAME, "failed to %s an address on %s: %s", + cmdstr, ifname, strerror(errno)); + close(s); + return (-1); +@@ -3334,14 +3334,14 @@ ifaddrconf(cmd, ifname, addr, plen, pltime, vltime) + #ifdef __sun__ + memcpy(&req.lifr_addr, addr, sizeof (*addr)); + if (ioctl(s, SIOCSLIFADDR, &req) == -1) { +- dprintf(LOG_NOTICE, FNAME, "failed to %s new address on %s: %s", ++ debug_printf(LOG_NOTICE, FNAME, "failed to %s new address on %s: %s", + cmdstr, ifname, strerror(errno)); + close(s); + return (-1); + } + #endif + +- dprintf(LOG_DEBUG, FNAME, "%s an address %s/%d on %s", cmdstr, ++ debug_printf(LOG_DEBUG, FNAME, "%s an address %s/%d on %s", cmdstr, + addr2str((struct sockaddr *)addr), plen, ifname); + + close(s); +@@ -3357,13 +3357,13 @@ safefile(path) + + /* no setuid */ + if (getuid() != geteuid()) { +- dprintf(LOG_NOTICE, FNAME, ++ debug_printf(LOG_NOTICE, FNAME, + "setuid'ed execution not allowed"); + return (-1); + } + + if (lstat(path, &s) != 0) { +- dprintf(LOG_NOTICE, FNAME, "lstat failed: %s", ++ debug_printf(LOG_NOTICE, FNAME, "lstat failed: %s", + strerror(errno)); + return (-1); + } +@@ -3371,7 +3371,7 @@ safefile(path) + /* the file must be owned by the running uid */ + myuid = getuid(); + if (s.st_uid != myuid) { +- dprintf(LOG_NOTICE, FNAME, "%s has invalid owner uid", path); ++ debug_printf(LOG_NOTICE, FNAME, "%s has invalid owner uid", path); + return (-1); + } + +@@ -3379,7 +3379,7 @@ safefile(path) + case S_IFREG: + break; + default: +- dprintf(LOG_NOTICE, FNAME, "%s is an invalid file type 0x%o", ++ debug_printf(LOG_NOTICE, FNAME, "%s is an invalid file type 0x%o", + path, (s.st_mode & S_IFMT)); + return (-1); + } +diff --git a/common.h b/common.h +index 7366c25..9fd8008 100644 +--- a/common.h ++++ b/common.h +@@ -155,7 +155,7 @@ extern char *in6addr2str __P((struct in6_addr *, int)); + extern int in6_addrscopebyif __P((struct in6_addr *, char *)); + extern int in6_scope __P((struct in6_addr *)); + extern void setloglevel __P((int)); +-extern void dprintf __P((int, const char *, const char *, ...)); ++extern void debug_printf __P((int, const char *, const char *, ...)); + extern int get_duid __P((char *, struct duid *)); + extern void dhcp6_init_options __P((struct dhcp6_optinfo *)); + extern void dhcp6_clear_options __P((struct dhcp6_optinfo *)); +diff --git a/config.c b/config.c +index 383c12a..3721545 100644 +--- a/config.c ++++ b/config.c +@@ -156,13 +156,13 @@ configure_interface(iflist) + struct cf_list *cfl; + + if (if_nametoindex(ifp->name) == 0) { +- dprintf(LOG_ERR, FNAME, "invalid interface(%s): %s", ++ debug_printf(LOG_ERR, FNAME, "invalid interface(%s): %s", + ifp->name, strerror(errno)); + goto bad; + } + + if ((ifc = malloc(sizeof(*ifc))) == NULL) { +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "memory allocation for %s failed", ifp->name); + goto bad; + } +@@ -171,7 +171,7 @@ configure_interface(iflist) + dhcp6_ifconflist = ifc; + + if ((ifc->ifname = strdup(ifp->name)) == NULL) { +- dprintf(LOG_ERR, FNAME, "failed to copy ifname"); ++ debug_printf(LOG_ERR, FNAME, "failed to copy ifname"); + goto bad; + } + +@@ -183,7 +183,7 @@ configure_interface(iflist) + switch(cfl->type) { + case DECL_REQUEST: + if (dhcp6_mode != DHCP6_MODE_CLIENT) { +- dprintf(LOG_INFO, FNAME, "%s:%d " ++ debug_printf(LOG_INFO, FNAME, "%s:%d " + "client-only configuration", + configfilename, + cfl->line); +@@ -208,7 +208,7 @@ configure_interface(iflist) + break; + case DECL_INFO_ONLY: + if (dhcp6_mode != DHCP6_MODE_CLIENT) { +- dprintf(LOG_INFO, FNAME, "%s:%d " ++ debug_printf(LOG_INFO, FNAME, "%s:%d " + "client-only configuration", + configfilename, cfl->line); + goto bad; +@@ -217,7 +217,7 @@ configure_interface(iflist) + break; + case DECL_PREFERENCE: + if (dhcp6_mode != DHCP6_MODE_SERVER) { +- dprintf(LOG_INFO, FNAME, "%s:%d " ++ debug_printf(LOG_INFO, FNAME, "%s:%d " + "server-only configuration", + configfilename, cfl->line); + goto bad; +@@ -225,7 +225,7 @@ configure_interface(iflist) + ifc->server_pref = (int)cfl->num; + if (ifc->server_pref < 0 || + ifc->server_pref > 255) { +- dprintf(LOG_INFO, FNAME, "%s:%d " ++ debug_printf(LOG_INFO, FNAME, "%s:%d " + "bad value: %d", + configfilename, cfl->line, + ifc->server_pref); +@@ -234,13 +234,13 @@ configure_interface(iflist) + break; + case DECL_SCRIPT: + if (dhcp6_mode != DHCP6_MODE_CLIENT) { +- dprintf(LOG_INFO, FNAME, "%s:%d " ++ debug_printf(LOG_INFO, FNAME, "%s:%d " + "client-only configuration", + configfilename, cfl->line); + goto bad; + } + if (ifc->scriptpath) { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "%s:%d duplicated configuration", + configfilename, cfl->line); + goto bad; +@@ -248,13 +248,13 @@ configure_interface(iflist) + cp = cfl->ptr; + ifc->scriptpath = strdup(cp + 1); + if (ifc->scriptpath == NULL) { +- dprintf(LOG_NOTICE, FNAME, ++ debug_printf(LOG_NOTICE, FNAME, + "failed to copy script path"); + goto bad; + } + cp = ifc->scriptpath; + if (*cp != '/') { +- dprintf(LOG_INFO, FNAME, ++ debug_printf(LOG_INFO, FNAME, + "script must be an absolute path"); + goto bad; + } +@@ -272,7 +272,7 @@ configure_interface(iflist) + if (strcmp(spec->name, pool->name) == 0) + break; + if (pool == NULL) { +- dprintf(LOG_ERR, FNAME, "%s:%d " ++ debug_printf(LOG_ERR, FNAME, "%s:%d " + "pool '%s' not found", + configfilename, cfl->line, + spec->name); +@@ -281,7 +281,7 @@ configure_interface(iflist) + if (spec->vltime != DHCP6_DURATION_INFINITE && + (spec->pltime == DHCP6_DURATION_INFINITE || + spec->pltime > spec->vltime)) { +- dprintf(LOG_ERR, FNAME, "%s:%d ", ++ debug_printf(LOG_ERR, FNAME, "%s:%d ", + configfilename, cfl->line, + "specified a larger preferred lifetime " + "than valid lifetime"); +@@ -289,17 +289,17 @@ configure_interface(iflist) + } + ifc->pool = *spec; + if ((ifc->pool.name = strdup(spec->name)) == NULL) { +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "memory allocation failed"); + goto bad; + } +- dprintf(LOG_DEBUG, FNAME, ++ debug_printf(LOG_DEBUG, FNAME, + "pool '%s' is specified to the interface '%s'", + ifc->pool.name, ifc->ifname); + } + break; + default: +- dprintf(LOG_ERR, FNAME, "%s:%d " ++ debug_printf(LOG_ERR, FNAME, "%s:%d " + "invalid interface configuration", + configfilename, cfl->line); + goto bad; +@@ -338,7 +338,7 @@ configure_ia(ialist, iatype) + confsize = sizeof(struct iana_conf); + break; + default: +- dprintf(LOG_ERR, FNAME, "internal error"); ++ debug_printf(LOG_ERR, FNAME, "internal error"); + goto bad; + } + +@@ -346,7 +346,7 @@ configure_ia(ialist, iatype) + struct cf_list *cfl; + + if ((iac = malloc(confsize)) == NULL) { +- dprintf(LOG_ERR, FNAME, ++ debug_printf(LOG_ERR, FNAME, + "memory allocation for IA %s failed", + iap->name); + goto bad; +@@ -386,13 +386,13 @@ configure_ia(ialist, iatype) + if (add_prefix(&pdp->iapd_prefix_list, + "IAPD", DHCP6_LISTVAL_PREFIX6, + cfl->ptr)) { +- dprintf(LOG_NOTICE, FNAME, "failed " ++ debug_printf(LOG_NOTICE, FNAME, "failed " + "to configure prefix"); + goto bad; + } + break; + default: +- dprintf(LOG_ERR, FNAME, "%s:%d " ++ debug_printf(LOG_ERR, FNAME, "%s:%d " + "invalid configuration", + configfilename, cfl->line); + goto bad; +@@ -404,20 +404,20 @@ configure_ia(ialist, iatype) + if (add_prefix(&nap->iana_address_list, + "IANA", DHCP6_LISTVAL_STATEFULADDR6, + cfl->ptr)) { +- ... [truncated message content] |