diff options
-rw-r--r-- | net/dhcp6/Makefile | 2 | ||||
-rw-r--r-- | net/dhcp6/files/patch-Makefile.in | 6 | ||||
-rw-r--r-- | net/dhcp6/files/patch-dhcp6c.c | 72 | ||||
-rw-r--r-- | net/dhcp6/pkg-plist | 6 |
4 files changed, 76 insertions, 10 deletions
diff --git a/net/dhcp6/Makefile b/net/dhcp6/Makefile index e4aa5ff8e53d..e045733c114e 100644 --- a/net/dhcp6/Makefile +++ b/net/dhcp6/Makefile @@ -3,7 +3,7 @@ PORTNAME= dhcp6 PORTVERSION= 20080615 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net ipv6 MASTER_SITES= SF/wide-dhcpv6/wide-dhcpv6/wide-dhcpv6-${PORTVERSION} DISTNAME= wide-dhcpv6-${PORTVERSION} diff --git a/net/dhcp6/files/patch-Makefile.in b/net/dhcp6/files/patch-Makefile.in index 63d8ae021c52..fc873189fca8 100644 --- a/net/dhcp6/files/patch-Makefile.in +++ b/net/dhcp6/files/patch-Makefile.in @@ -1,6 +1,6 @@ ---- Makefile.in.orig 2007-03-21 18:52:58.000000000 +0900 -+++ Makefile.in 2013-10-17 12:26:22.000000000 +0900 -@@ -102,14 +102,14 @@ +--- Makefile.in.orig 2007-03-21 09:52:58 UTC ++++ Makefile.in +@@ -102,14 +102,14 @@ $(srcdir)/ianaopts.h: gentab.pl bootp-dh expand bootp-dhcp-parameters | perl gentab.pl > ianaopts.h install:: diff --git a/net/dhcp6/files/patch-dhcp6c.c b/net/dhcp6/files/patch-dhcp6c.c new file mode 100644 index 000000000000..70645a010f34 --- /dev/null +++ b/net/dhcp6/files/patch-dhcp6c.c @@ -0,0 +1,72 @@ +--- dhcp6c.c.orig 2008-06-15 07:48:41 UTC ++++ dhcp6c.c +@@ -67,6 +67,7 @@ + #include <string.h> + #include <err.h> + #include <ifaddrs.h> ++#include <fcntl.h> + + #include <dhcp6.h> + #include <config.h> +@@ -257,7 +258,7 @@ client6_init() + { + struct addrinfo hints, *res; + static struct sockaddr_in6 sa6_allagent_storage; +- int error, on = 1; ++ int error, on = 0; + + /* get our DUID */ + if (get_duid(DUID_FILE, &client_duid)) { +@@ -287,6 +288,20 @@ client6_init() + dprintf(LOG_ERR, FNAME, "socket"); + exit(1); + } ++ ++ if ((on = fcntl(sock, F_GETFL, 0)) == -1) { ++ dprintf(LOG_ERR, FNAME, "fctnl getflags"); ++ exit(1); ++ } ++ ++ on |= FD_CLOEXEC; ++ ++ if ((on = fcntl(sock, F_SETFL, on)) == -1) { ++ dprintf(LOG_ERR, FNAME, "fctnl setflags"); ++ exit(1); ++ } ++ ++ on = 1; + if (setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, + &on, sizeof(on)) < 0) { + dprintf(LOG_ERR, FNAME, +@@ -1828,15 +1843,6 @@ client6_recvreply(ifp, dh6, len, optinfo + } + + /* +- * Call the configuration script, if specified, to handle various +- * configuration parameters. +- */ +- if (ifp->scriptpath != NULL && strlen(ifp->scriptpath) != 0) { +- dprintf(LOG_DEBUG, FNAME, "executes %s", ifp->scriptpath); +- client6_script(ifp->scriptpath, state, optinfo); +- } +- +- /* + * Set refresh timer for configuration information specified in + * information-request. If the timer value is specified by the server + * in an information refresh time option, use it; use the protocol +@@ -1888,6 +1894,15 @@ client6_recvreply(ifp, dh6, len, optinfo + &optinfo->serverID, ev->authparam); + } + ++ /* ++ * Call the configuration script, if specified, to handle various ++ * configuration parameters. ++ */ ++ if (ifp->scriptpath != NULL && strlen(ifp->scriptpath) != 0) { ++ dprintf(LOG_DEBUG, FNAME, "executes %s", ifp->scriptpath); ++ client6_script(ifp->scriptpath, state, optinfo); ++ } ++ + dhcp6_remove_event(ev); + + if (state == DHCP6S_RELEASE) { diff --git a/net/dhcp6/pkg-plist b/net/dhcp6/pkg-plist index 18009631d93d..27b7c4fe103f 100644 --- a/net/dhcp6/pkg-plist +++ b/net/dhcp6/pkg-plist @@ -1,9 +1,3 @@ -@unexec %D/etc/rc.d/dhcp6s.sh forcestop 2>/dev/null || true -@unexec %D/etc/rc.d/dhcp6relay.sh forcestop 2>/dev/null || true -@unexec %D/etc/rc.d/dhcp6c.sh forcestop 2>/dev/null || true -@unexec %D/etc/rc.d/dhcp6s forcestop 2>/dev/null || true -@unexec %D/etc/rc.d/dhcp6relay forcestop 2>/dev/null || true -@unexec %D/etc/rc.d/dhcp6c forcestop 2>/dev/null || true etc/dhcp6s.conf.sample etc/dhcp6c.conf.sample sbin/dhcp6c |