git: d3a8411adcf5 - main - net/dhcpcd: update to 10.3.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Nov 2025 16:07:45 UTC
The branch main has been updated by driesm:
URL: https://cgit.FreeBSD.org/ports/commit/?id=d3a8411adcf5956f5e2b330ffc29cc7ff01c0f22
commit d3a8411adcf5956f5e2b330ffc29cc7ff01c0f22
Author: Dries Michiels <driesm@FreeBSD.org>
AuthorDate: 2025-11-14 16:05:18 +0000
Commit: Dries Michiels <driesm@FreeBSD.org>
CommitDate: 2025-11-14 16:06:30 +0000
net/dhcpcd: update to 10.3.0
Changes: https://github.com/NetworkConfiguration/dhcpcd/releases/tag/v10.3.0
---
net/dhcpcd/Makefile | 3 +-
net/dhcpcd/distinfo | 6 +-
net/dhcpcd/files/patch-src_dhcpcd.c | 33 -----------
net/dhcpcd/files/patch-src_logerr.c | 94 -------------------------------
net/dhcpcd/files/patch-src_logerr.h | 11 ----
net/dhcpcd/files/patch-src_privsep-root.c | 28 ---------
net/dhcpcd/files/patch-src_privsep.c | 81 --------------------------
7 files changed, 4 insertions(+), 252 deletions(-)
diff --git a/net/dhcpcd/Makefile b/net/dhcpcd/Makefile
index 83aa628d3fb5..24e7319d2cdc 100644
--- a/net/dhcpcd/Makefile
+++ b/net/dhcpcd/Makefile
@@ -1,6 +1,5 @@
PORTNAME= dhcpcd
-DISTVERSION= 10.2.4
-PORTREVISION= 1
+DISTVERSION= 10.3.0
CATEGORIES= net
MASTER_SITES= https://github.com/NetworkConfiguration/${PORTNAME}/releases/download/v${DISTVERSION}/
diff --git a/net/dhcpcd/distinfo b/net/dhcpcd/distinfo
index 7d88e0269e56..f4c96d61e86f 100644
--- a/net/dhcpcd/distinfo
+++ b/net/dhcpcd/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1748841759
-SHA256 (dhcpcd-10.2.4.tar.xz) = 6721e606609226dbf4d864a78802a9e96beec0ee034a1bd84138b3e037bba7d9
-SIZE (dhcpcd-10.2.4.tar.xz) = 276444
+TIMESTAMP = 1763136225
+SHA256 (dhcpcd-10.3.0.tar.xz) = 06e4c1aaf958523f3fd1c57258c613c6c7ae56b8f1d678fa7943495d5ea6aeb5
+SIZE (dhcpcd-10.3.0.tar.xz) = 279100
diff --git a/net/dhcpcd/files/patch-src_dhcpcd.c b/net/dhcpcd/files/patch-src_dhcpcd.c
deleted file mode 100644
index a2c0f8559bd0..000000000000
--- a/net/dhcpcd/files/patch-src_dhcpcd.c
+++ /dev/null
@@ -1,33 +0,0 @@
---- src/dhcpcd.c.orig 2025-06-01 18:40:28 UTC
-+++ src/dhcpcd.c
-@@ -393,7 +393,7 @@ dhcpcd_daemonise(struct dhcpcd_ctx *ctx)
-
- eloop_event_delete(ctx->eloop, ctx->fork_fd);
- exit_code = EXIT_SUCCESS;
-- if (write(ctx->fork_fd, &exit_code, sizeof(exit_code)) == -1)
-+ if (send(ctx->fork_fd, &exit_code, sizeof(exit_code), MSG_EOR) == -1)
- logerr(__func__);
- close(ctx->fork_fd);
- ctx->fork_fd = -1;
-@@ -1449,8 +1449,8 @@ dhcpcd_signal_cb(int sig, void *arg)
-
- if (sig != SIGCHLD && ctx->options & DHCPCD_FORKED) {
- if (sig != SIGHUP &&
-- write(ctx->fork_fd, &sig, sizeof(sig)) == -1)
-- logerr("%s: write", __func__);
-+ send(ctx->fork_fd, &sig, sizeof(sig), MSG_EOR) == -1)
-+ logerr("%s: send", __func__);
- return;
- }
-
-@@ -2712,8 +2712,8 @@ exit1:
- #ifdef USE_SIGNALS
- /* If still attached, detach from the launcher */
- if (ctx.options & DHCPCD_STARTED && ctx.fork_fd != -1) {
-- if (write(ctx.fork_fd, &i, sizeof(i)) == -1)
-- logerr("%s: write", __func__);
-+ if (send(ctx.fork_fd, &i, sizeof(i), MSG_EOR) == -1)
-+ logerr("%s: send", __func__);
- }
- #endif
-
diff --git a/net/dhcpcd/files/patch-src_logerr.c b/net/dhcpcd/files/patch-src_logerr.c
deleted file mode 100644
index 6f4861cd3a1d..000000000000
--- a/net/dhcpcd/files/patch-src_logerr.c
+++ /dev/null
@@ -1,94 +0,0 @@
---- src/logerr.c.orig 2025-06-01 18:40:28 UTC
-+++ src/logerr.c
-@@ -26,7 +26,9 @@
- * SUCH DAMAGE.
- */
-
-+#include <sys/socket.h>
- #include <sys/time.h>
-+
- #include <errno.h>
- #include <stdbool.h>
- #include <stdarg.h>
-@@ -215,18 +217,25 @@ vlogmessage(int pri, const char *fmt, va_list args)
- int len = 0;
-
- if (ctx->log_fd != -1) {
-+ pid_t pid = getpid();
- char buf[LOGERR_SYSLOGBUF];
-- pid_t pid;
-+ struct iovec iov[] = {
-+ { .iov_base = &pri, .iov_len = sizeof(pri) },
-+ { .iov_base = &pid, .iov_len = sizeof(pid) },
-+ { .iov_base = buf },
-+ };
-
-- memcpy(buf, &pri, sizeof(pri));
-- pid = getpid();
-- memcpy(buf + sizeof(pri), &pid, sizeof(pid));
-- len = vsnprintf(buf + sizeof(pri) + sizeof(pid),
-- sizeof(buf) - sizeof(pri) - sizeof(pid),
-- fmt, args);
-- if (len != -1)
-- len = (int)write(ctx->log_fd, buf,
-- ((size_t)++len) + sizeof(pri) + sizeof(pid));
-+ len = vsnprintf(buf, sizeof(buf), fmt, args);
-+ if (len != -1) {
-+ if ((size_t)len >= sizeof(buf))
-+ len = (int)sizeof(buf) - 1;
-+ iov[2].iov_len = (size_t)(len + 1);
-+ struct msghdr msg = {
-+ .msg_iov = iov,
-+ .msg_iovlen = sizeof(iov) / sizeof(iov[0]),
-+ };
-+ len = (int)sendmsg(ctx->log_fd, &msg, MSG_EOR);
-+ }
- return len;
- }
-
-@@ -390,24 +399,33 @@ logreadfd(int fd)
- logreadfd(int fd)
- {
- struct logctx *ctx = &_logctx;
-- char buf[LOGERR_SYSLOGBUF];
- int len, pri;
-+ pid_t pid;
-+ char buf[LOGERR_SYSLOGBUF] = { '\0' };
-+ struct iovec iov[] = {
-+ { .iov_base = &pri, .iov_len = sizeof(pri) },
-+ { .iov_base = &pid, .iov_len = sizeof(pid) },
-+ { .iov_base = buf, .iov_len = sizeof(buf) },
-+ };
-+ struct msghdr msg = {
-+ .msg_iov = iov,
-+ .msg_iovlen = sizeof(iov) / sizeof(iov[0])
-+ };
-
-- len = (int)read(fd, buf, sizeof(buf));
-- if (len == -1)
-+ len = (int)recvmsg(fd, &msg, MSG_WAITALL);
-+ if (len == -1 || len == 0)
- return -1;
--
-- /* Ensure we have pri, pid and a terminator */
-- if (len < (int)(sizeof(pri) + sizeof(pid_t) + 1) ||
-- buf[len - 1] != '\0')
-- {
-- errno = EINVAL;
-+ /* Ensure we received the minimum and at least one character to log */
-+ if ((size_t)len < sizeof(pri) + sizeof(pid) + 1 ||
-+ msg.msg_flags & MSG_TRUNC) {
-+ errno = EMSGSIZE;
- return -1;
- }
-+ /* Ensure what we receive is NUL terminated */
-+ buf[(size_t)len - (sizeof(pri) + sizeof(pid)) - 1] = '\0';
-
-- memcpy(&pri, buf, sizeof(pri));
-- memcpy(&ctx->log_pid, buf + sizeof(pri), sizeof(ctx->log_pid));
-- logmessage(pri, "%s", buf + sizeof(pri) + sizeof(ctx->log_pid));
-+ ctx->log_pid = pid;
-+ logmessage(pri, "%s", buf);
- ctx->log_pid = 0;
- return len;
- }
diff --git a/net/dhcpcd/files/patch-src_logerr.h b/net/dhcpcd/files/patch-src_logerr.h
deleted file mode 100644
index 1c5f07205169..000000000000
--- a/net/dhcpcd/files/patch-src_logerr.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/logerr.h.orig 2025-06-01 18:40:28 UTC
-+++ src/logerr.h
-@@ -76,7 +76,7 @@ __printflike(2, 3) void logerrmessage(int pri, const c
- #define logerr(...) log_err(__VA_ARGS__)
- #define logerrx(...) log_errx(__VA_ARGS__)
-
--/* For logging in a chroot */
-+/* For logging in a chroot using SOCK_SEQPACKET */
- int loggetfd(void);
- void logsetfd(int);
- int logreadfd(int);
diff --git a/net/dhcpcd/files/patch-src_privsep-root.c b/net/dhcpcd/files/patch-src_privsep-root.c
deleted file mode 100644
index 83242bb52106..000000000000
--- a/net/dhcpcd/files/patch-src_privsep-root.c
+++ /dev/null
@@ -1,28 +0,0 @@
---- src/privsep-root.c.orig 2025-06-01 18:40:28 UTC
-+++ src/privsep-root.c
-@@ -210,6 +210,7 @@ ps_root_writeerror(struct dhcpcd_ctx *ctx, ssize_t res
- { .iov_base = &psr, .iov_len = sizeof(psr) },
- { .iov_base = data, .iov_len = len },
- };
-+ struct msghdr msg = { .msg_iov = iov, .msg_iovlen = __arraycount(iov) };
- ssize_t err;
- int fd = PS_ROOT_FD(ctx);
-
-@@ -217,7 +218,7 @@ ps_root_writeerror(struct dhcpcd_ctx *ctx, ssize_t res
- logdebugx("%s: result %zd errno %d", __func__, result, errno);
- #endif
-
-- err = writev(fd, iov, __arraycount(iov));
-+ err = sendmsg(fd, &msg, MSG_EOR);
-
- /* Error sending the message? Try sending the error of sending. */
- if (err == -1) {
-@@ -227,7 +228,7 @@ ps_root_writeerror(struct dhcpcd_ctx *ctx, ssize_t res
- psr.psr_errno = errno;
- iov[1].iov_base = NULL;
- iov[1].iov_len = 0;
-- err = writev(fd, iov, __arraycount(iov));
-+ err = sendmsg(fd, &msg, MSG_EOR);
- }
-
- return err;
diff --git a/net/dhcpcd/files/patch-src_privsep.c b/net/dhcpcd/files/patch-src_privsep.c
deleted file mode 100644
index 0258308ee061..000000000000
--- a/net/dhcpcd/files/patch-src_privsep.c
+++ /dev/null
@@ -1,81 +0,0 @@
---- src/privsep.c.orig 2025-06-01 18:40:28 UTC
-+++ src/privsep.c
-@@ -895,7 +895,7 @@ ps_sendpsmmsg(struct dhcpcd_ctx *ctx, int fd,
- { .iov_base = NULL, }, /* payload 2 */
- { .iov_base = NULL, }, /* payload 3 */
- };
-- int iovlen;
-+ struct msghdr m = { .msg_iov = iov, .msg_iovlen = 1 };
- ssize_t len;
-
- if (msg != NULL) {
-@@ -909,6 +909,7 @@ ps_sendpsmmsg(struct dhcpcd_ctx *ctx, int fd,
- iovp->iov_base = msg->msg_name;
- iovp->iov_len = msg->msg_namelen;
- iovp++;
-+ m.msg_iovlen++;
-
- cmsg_padlen =
- CALC_CMSG_PADLEN(msg->msg_controllen, msg->msg_namelen);
-@@ -916,25 +917,26 @@ ps_sendpsmmsg(struct dhcpcd_ctx *ctx, int fd,
- iovp->iov_len = cmsg_padlen;
- iovp->iov_base = cmsg_padlen != 0 ? padding : NULL;
- iovp++;
-+ m.msg_iovlen++;
-
- iovp->iov_base = msg->msg_control;
- iovp->iov_len = msg->msg_controllen;
-- iovlen = 4;
-+ iovp++;
-+ m.msg_iovlen++;
-
- for (i = 0; i < (int)msg->msg_iovlen; i++) {
-- if ((size_t)(iovlen + i) > __arraycount(iov)) {
-+ if ((size_t)(m.msg_iovlen++) > __arraycount(iov)) {
- errno = ENOBUFS;
- return -1;
- }
-- iovp++;
- iovp->iov_base = msg->msg_iov[i].iov_base;
- iovp->iov_len = msg->msg_iov[i].iov_len;
-+ iovp++;
- }
-- iovlen += i;
-- } else
-- iovlen = 1;
-+ }
-
-- len = writev(fd, iov, iovlen);
-+ len = sendmsg(fd, &m, MSG_EOR);
-+
- if (len == -1) {
- if (ctx->options & DHCPCD_FORKED &&
- !(ctx->options & DHCPCD_PRIVSEPROOT))
-@@ -1028,6 +1030,7 @@ ps_sendcmdmsg(int fd, uint16_t cmd, const struct msghd
- { .iov_base = &psm, .iov_len = sizeof(psm) },
- { .iov_base = data, .iov_len = 0 },
- };
-+ struct msghdr m = { .msg_iov = iov, .msg_iovlen = __arraycount(iov) };
- size_t dl = sizeof(data);
- socklen_t cmsg_padlen =
- CALC_CMSG_PADLEN(msg->msg_controllen, msg->msg_namelen);
-@@ -1063,8 +1066,9 @@ ps_sendcmdmsg(int fd, uint16_t cmd, const struct msghd
- psm.ps_namelen + psm.ps_controllen + psm.ps_datalen + cmsg_padlen;
- if (psm.ps_datalen != 0)
- memcpy(p, msg->msg_iov[0].iov_base, psm.ps_datalen);
-- return writev(fd, iov, __arraycount(iov));
-
-+ return sendmsg(fd, &m, MSG_EOR);
-+
- nobufs:
- errno = ENOBUFS;
- return -1;
-@@ -1089,7 +1093,7 @@ ps_recvmsg(int rfd, unsigned short events, uint16_t cm
- if (!(events & ELE_READ))
- logerrx("%s: unexpected event 0x%04x", __func__, events);
-
-- len = recvmsg(rfd, &msg, 0);
-+ len = recvmsg(rfd, &msg, MSG_WAITALL);
- if (len == -1) {
- logerr("%s: recvmsg", __func__);
- return len;