From owner-freebsd-ports@freebsd.org Sun Jun 7 08:37:15 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC80C34CC88 for ; Sun, 7 Jun 2020 08:37:15 +0000 (UTC) (envelope-from driesm.michiels@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 49fqWG6HTKz4CRw for ; Sun, 7 Jun 2020 08:37:14 +0000 (UTC) (envelope-from driesm.michiels@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id D58D034C85E; Sun, 7 Jun 2020 08:37:14 +0000 (UTC) Delivered-To: ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D423834CBB3 for ; Sun, 7 Jun 2020 08:37:14 +0000 (UTC) (envelope-from driesm.michiels@gmail.com) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49fqWF534Dz4CN2; Sun, 7 Jun 2020 08:37:13 +0000 (UTC) (envelope-from driesm.michiels@gmail.com) Received: by mail-ed1-x534.google.com with SMTP id m21so10828791eds.13; Sun, 07 Jun 2020 01:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-language:thread-index; bh=IIOlEZNahU2I+UkvP7x0kKA+s4C2aq/hr4SeC4iGl7s=; b=XBnalXIoBOa/RB2Nem/g79lNcaJfKrQSwAEXt5Y0gWC+pWo5ruDDCA+f9KuvxkQ0PT gl8i6V0hymadcLpbaPT+522wCUYr/PJD6G8LP2QXo51GUznmffWFQC/Q2UwlQxx5lS4B ax3RTzKISTmBXbpess0KfRUR3QNL+0nyhwdcrR19VbQFsYndZaGO66z7aFegt3wX/dVd RIRCWzWk0BR70oHb4/q4z1k9zlt3Jg8LS52zKcrkQVRwIGrQkvnIkIATF+VQ8+z9GveZ Rh4Ar38p9zo28neR3WvhR+Yi40cRfewi9GpsMp3KsuRCLJf8vm5WqEz63NsCaViyY+wd zI/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:references:in-reply-to:subject:date :message-id:mime-version:content-language:thread-index; bh=IIOlEZNahU2I+UkvP7x0kKA+s4C2aq/hr4SeC4iGl7s=; b=EBnjuiac9ysJ9MpWK4UiJ3TVXpvemRHBO9Exyo2uWjZfznchbJuiJzNILY6XiVPIoH pp3qckjsgw7ixUIawLjf9gCXG6pjFsqVVFW7wrtk5DbdcvfZiPh1vmK0I5K03/pQ71qf eCRwZ9FopG+sMdzbjQrOkdWBmttld/3t0pmD/gE5Z487EPf+YZzXumyeVaZuEkHBU0vg 6bB5efQpYDw/97zYyYHZQr/ypvbMxhEV0mXnwH84S+YoB7KqnMXj2zcrvM43bZ1nF1fU nGaqeC+Qb909aL77gA1QkuFwYf02c+TW43wlbHN5ntYtF7zGHVqwg+/gunzoN5AX5QQc RiTw== X-Gm-Message-State: AOAM533ysUJJ9cIhpgc7r6jf6k1bExwkUHY9ogd28SOkecbpp/W7Jj39 Z6yffJn1gFTQFlKXov//lO8= X-Google-Smtp-Source: ABdhPJxepiK/US2pMfhBbc2k+Ag4kJ5gyFnItEaZrMn8zcDbcppyrg1IeJQkzI8KCRSytERNWKjWKw== X-Received: by 2002:a50:ee01:: with SMTP id g1mr16498786eds.44.1591519031122; Sun, 07 Jun 2020 01:37:11 -0700 (PDT) Received: from DRIESPC (ptr-8sijbm8dkktzzml9u9r.18120a2.ip6.access.telenet.be. [2a02:1811:2505:1601:e91f:29c0:c69a:3e7f]) by smtp.gmail.com with ESMTPSA id j11sm8001480ejk.67.2020.06.07.01.37.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Jun 2020 01:37:10 -0700 (PDT) From: To: "'Douglas Thrift'" Cc: , "'Roy Marples'" , References: <8f21b571-a4d2-ad5d-b4b7-3e36436fa018@gmail.com> In-Reply-To: <8f21b571-a4d2-ad5d-b4b7-3e36436fa018@gmail.com> Subject: RE: FreeBSD Port: dhcpcd-9.1.0 Date: Sun, 7 Jun 2020 10:37:09 +0200 Message-ID: <001301d63ca6$d5ddaa00$8198fe00$@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0014_01D63CB7.9966C820" X-Mailer: Microsoft Outlook 16.0 Content-Language: nl-be Thread-Index: AQJWx7PEsLH+IswGcDI1g7e5Z2YrfKfLu1tg X-Rspamd-Queue-Id: 49fqWF534Dz4CN2 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=XBnalXIo; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of driesmmichiels@gmail.com designates 2a00:1450:4864:20::534 as permitted sender) smtp.mailfrom=driesmmichiels@gmail.com X-Spamd-Result: default: False [-3.87 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; HAS_ATTACHMENT(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.85)[-0.848]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.992]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.03)[-1.029]; MIME_GOOD(-0.10)[multipart/mixed,text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NO_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::534:from]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2020 08:37:15 -0000 This is a multipart message in MIME format. ------=_NextPart_000_0014_01D63CB7.9966C820 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit > -----Original Message----- > From: owner-freebsd-ports@freebsd.org ports@freebsd.org> On Behalf Of Douglas Thrift > Sent: zondag 7 juni 2020 1:54 > To: woodsb02@FreeBSD.org > Cc: ports@FreeBSD.org > Subject: FreeBSD Port: dhcpcd-9.1.0 > > Hello, > > I just upgraded to dhcpcd 9.1.0 and I'm running into some weird issues. > The first thing I noticed was that the value for `pidfile` changed which made a > `service dhcpcd restart igb0` fail initially. After figuring this out, I was able to > stop the previous dhcpcd manually and then I discovered that the `pidfile` > was still incorrect: > > pidfile="/var/run/dhcpcd/dhcpcd-$ifn.pid" > > should actually be: > > pidfile="/var/run/dhcpcd/$ifn.pid" > > However, even after changing that, running `service dhcpcd start igb0` was > sticking to the foreground rather than daemonizing and returning me to a > prompt. I tried a number of ways to pass the -b/--background flag, but even > just running `dhcpcd -b igb0` manually did not daemonize. I reckon you are running FreeBSD 13-CURRENT (as I am)? I actually had the same problem and noticed some error messages in /var/log/messages.log. Roy has provided a patch for the dhcpcd source in attachments, this fixed it for me. It has already been committed to master and should be fixed in the new dhcpcd-9.1.1 release. > Could you look into these issues? > > Thanks! > -- > Douglas William Thrift > > _______________________________________________ > freebsd-ports@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" ------=_NextPart_000_0014_01D63CB7.9966C820 Content-Type: application/octet-stream; name="dhcpcd-buf.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dhcpcd-buf.diff" diff --git a/src/privsep.c b/src/privsep.c index ce4f0565..ce84ff80 100644 --- a/src/privsep.c +++ b/src/privsep.c @@ -131,6 +131,20 @@ ps_dropprivs(struct dhcpcd_ctx *ctx) return 0; } +static int +ps_setbuf(int fd) +{ + socklen_t len = (socklen_t)sizeof(struct ps_msg); + + if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &len, sizeof(len)) == -1 || + setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &len, sizeof(len)) == -1) + { + logerr(__func__); + return -1; + } + return 0; +} + pid_t ps_dostart(struct dhcpcd_ctx *ctx, pid_t *priv_pid, int *priv_fd, @@ -160,6 +174,7 @@ ps_dostart(struct dhcpcd_ctx *ctx, case 0: *priv_fd = fd[1]; close(fd[0]); + ps_setbuf(*priv_fd); break; default: *priv_pid = pid; @@ -181,6 +196,7 @@ ps_dostart(struct dhcpcd_ctx *ctx, logerr("%s: eloop_event_add", __func__); return -1; } + ps_setbuf(*priv_fd); return pid; } ------=_NextPart_000_0014_01D63CB7.9966C820--