View | Details | Raw Unified | Return to bug 204462
Collapse All | Expand All

(-)Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	dhcp6
4
PORTNAME=	dhcp6
5
PORTVERSION=	20080615
5
PORTVERSION=	20080615
6
PORTREVISION=	2
6
PORTREVISION=	3
7
CATEGORIES=	net ipv6
7
CATEGORIES=	net ipv6
8
MASTER_SITES=	SF/wide-dhcpv6/wide-dhcpv6/wide-dhcpv6-${PORTVERSION}
8
MASTER_SITES=	SF/wide-dhcpv6/wide-dhcpv6/wide-dhcpv6-${PORTVERSION}
9
DISTNAME=	wide-dhcpv6-${PORTVERSION}
9
DISTNAME=	wide-dhcpv6-${PORTVERSION}
(-)files/patch-Makefile.in (-3 / +3 lines)
Lines 1-6 Link Here
1
--- Makefile.in.orig	2007-03-21 18:52:58.000000000 +0900
1
--- Makefile.in.orig	2007-03-21 09:52:58 UTC
2
+++ Makefile.in	2013-10-17 12:26:22.000000000 +0900
2
+++ Makefile.in
3
@@ -102,14 +102,14 @@
3
@@ -102,14 +102,14 @@ $(srcdir)/ianaopts.h: gentab.pl bootp-dh
4
 	expand bootp-dhcp-parameters | perl gentab.pl > ianaopts.h
4
 	expand bootp-dhcp-parameters | perl gentab.pl > ianaopts.h
5
 
5
 
6
 install::
6
 install::
(-)files/patch-dhcp6c.c (+72 lines)
Line 0 Link Here
1
--- dhcp6c.c.orig	2008-06-15 07:48:41 UTC
2
+++ dhcp6c.c
3
@@ -67,6 +67,7 @@
4
 #include <string.h>
5
 #include <err.h>
6
 #include <ifaddrs.h>
7
+#include <fcntl.h>
8
 
9
 #include <dhcp6.h>
10
 #include <config.h>
11
@@ -257,7 +258,7 @@ client6_init()
12
 {
13
 	struct addrinfo hints, *res;
14
 	static struct sockaddr_in6 sa6_allagent_storage;
15
-	int error, on = 1;
16
+	int error, on = 0;
17
 
18
 	/* get our DUID */
19
 	if (get_duid(DUID_FILE, &client_duid)) {
20
@@ -287,6 +288,20 @@ client6_init()
21
 		dprintf(LOG_ERR, FNAME, "socket");
22
 		exit(1);
23
 	}
24
+
25
+        if ((on = fcntl(sock, F_GETFL, 0)) == -1) {
26
+		dprintf(LOG_ERR, FNAME, "fctnl getflags");
27
+		exit(1);
28
+	}
29
+
30
+        on |= FD_CLOEXEC;
31
+
32
+        if ((on = fcntl(sock, F_SETFL, on)) == -1) {
33
+		dprintf(LOG_ERR, FNAME, "fctnl setflags");
34
+		exit(1);
35
+	}
36
+
37
+	on = 1;
38
 	if (setsockopt(sock, SOL_SOCKET, SO_REUSEPORT,
39
 		       &on, sizeof(on)) < 0) {
40
 		dprintf(LOG_ERR, FNAME,
41
@@ -1828,15 +1843,6 @@ client6_recvreply(ifp, dh6, len, optinfo
42
 	}
43
 
44
 	/*
45
-	 * Call the configuration script, if specified, to handle various
46
-	 * configuration parameters.
47
-	 */
48
-	if (ifp->scriptpath != NULL && strlen(ifp->scriptpath) != 0) {
49
-		dprintf(LOG_DEBUG, FNAME, "executes %s", ifp->scriptpath);
50
-		client6_script(ifp->scriptpath, state, optinfo);
51
-	}
52
-
53
-	/*
54
 	 * Set refresh timer for configuration information specified in
55
 	 * information-request.  If the timer value is specified by the server
56
 	 * in an information refresh time option, use it; use the protocol
57
@@ -1888,6 +1894,15 @@ client6_recvreply(ifp, dh6, len, optinfo
58
 		    &optinfo->serverID, ev->authparam);
59
 	}
60
 
61
+	/*
62
+	 * Call the configuration script, if specified, to handle various
63
+	 * configuration parameters.
64
+	 */
65
+	if (ifp->scriptpath != NULL && strlen(ifp->scriptpath) != 0) {
66
+		dprintf(LOG_DEBUG, FNAME, "executes %s", ifp->scriptpath);
67
+		client6_script(ifp->scriptpath, state, optinfo);
68
+	}
69
+
70
 	dhcp6_remove_event(ev);
71
 
72
 	if (state == DHCP6S_RELEASE) {

Return to bug 204462