FreeBSD Bugzilla – Attachment 163002 Details for
Bug 204462
[patch] net/dhcp6: Set socket CLOEXEC and execute script later
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
pfSense fixes
dhcp6.diff (text/plain), 3.38 KB, created by
Renato Botelho
on 2015-11-11 09:49:25 UTC
(
hide
)
Description:
pfSense fixes
Filename:
MIME Type:
Creator:
Renato Botelho
Created:
2015-11-11 09:49:25 UTC
Size:
3.38 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 401091) >+++ Makefile (working copy) >@@ -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} >Index: files/patch-Makefile.in >=================================================================== >--- files/patch-Makefile.in (revision 401091) >+++ files/patch-Makefile.in (working copy) >@@ -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:: >Index: files/patch-dhcp6c.c >=================================================================== >--- files/patch-dhcp6c.c (nonexistent) >+++ files/patch-dhcp6c.c (working copy) >@@ -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) { > >Property changes on: files/patch-dhcp6c.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 204462
: 163002