From nobody Tue Aug 20 05:02:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wny4m2Wdqz5VFmn; Tue, 20 Aug 2024 05:02:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wny4l6w56z4QS4; Tue, 20 Aug 2024 05:02:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724130136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nPTcx8DpqdCe43BUCE5zgsdjA8/8n5iz9bn/tmBEvSE=; b=aciGwZhFcU6ucIwSZ9bq5elnn82zq4ytP0FT5qqJnH8i95UJqO9CVPn7bFeQjQUjL7k8wF FNiRpZBmovJOlP/NN73Ret6fSN6UOkTanrdFxkj/vjweBTG2hxJanmKa9B5DkfaZpGDQa2 6Wn4+X6xr9pR/wn2IL+9b/e/zf3TJMOXrNnE7Qtpawl+zmZX9Alq5MAM33VFQYdAQQRh7I 8W3lRhQuhVYIrExDeT4O0qyO2mvzYR4aDOEUXcEJ8Y8ruwmDRY4H96IsdMKzG/i6YCG6Vm GFBaf4jvKRVMmQ0C9RXuvBm9mEBOJYKxAzWe1aoy6AeCVnHpfy6OUZR63m9flw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724130136; a=rsa-sha256; cv=none; b=Nzr1xJg5dyfdMO9hjeRqnX2ETzEloxjrKhn8AVsCTHxhl8YFOx3Gkqx0jC2jh6QWp/Gg7l g493L2MOcajGfRJsTxx0iOrz6hpIXahMYj7O3oQhQYke1paMeirXeHOzI6B4kleBYW+ieA XUJsZQOaXqDpPZSly/SNb1jRPZCEAei9WWKtbzcnS0BtNLHNaAJbg0FoMX2omP8BIx6UjT ZTeIi8FKb7l7Q3jrRwKj2tD/h8Je+BG3L+gEOJf1v8obSYyA5qI7iQFkNbJEuVc/rg9LD5 dUTlGmBxZECxAYYJoBG3CDLzIUe2T0Z2oXFpdPxlARKM+28L22zIigbDCPU18w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724130136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nPTcx8DpqdCe43BUCE5zgsdjA8/8n5iz9bn/tmBEvSE=; b=pLpuO0N+59cQBbrk84yYR3Bp/celbGXStu7gsq58JyUtx1X6W2ZNRO67QKoVdTNzndiUNE wOHsqEsucXXy2QVNMdy5tkzLZsKcqxqJTkVgxIlD2oUo/ReUKOL5tgcRURPXqmkr2zplVI M+4QtixciZE+2K/uK0HAuL/iIBolP+LtIpJSZlNSm3ZGm9kj9Vk7oUo7y72dZeh+tRYyue s9f79jY9iNoVbsUnbY9W3as26nBIZf9d0JvO+XCuSQ3Qp7OgsvY6W+LU2jMXvVMpvRd0NR r6wZ5CKLCbCEwYZWkL3hMGcNrYLtIruGLS1yVs2aegYR6Jx1Iesa2Y0alvv5lQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Wny4l6WwPznGw; Tue, 20 Aug 2024 05:02:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47K52F4j072295; Tue, 20 Aug 2024 05:02:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47K52Fan072292; Tue, 20 Aug 2024 05:02:15 GMT (envelope-from git) Date: Tue, 20 Aug 2024 05:02:15 GMT Message-Id: <202408200502.47K52Fan072292@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 1f0f31f082d5 - stable/13 - dhclient: rc.conf option to disable ARP resolution List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1f0f31f082d50c2adb3caa32420b1a16179dea3b Auto-Submitted: auto-generated The branch stable/13 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=1f0f31f082d50c2adb3caa32420b1a16179dea3b commit 1f0f31f082d50c2adb3caa32420b1a16179dea3b Author: Isaac Cilia Attard AuthorDate: 2024-07-13 10:07:29 +0000 Commit: Colin Percival CommitDate: 2024-08-20 04:58:36 +0000 dhclient: rc.conf option to disable ARP resolution Introduce a new rc.conf option to not wait for ARP resolution within dhclient. This is plausible on many modern networks where it is possible to trust the DHCP server to know whether an IP address is available. Sponsored by: Google LLC (GSoC 2024) Signed-off-by: Isaac Cilia Attard MFC after: 10 days Reviwed by: cperciva, brooks, Tom Hukins, Alexander Ziaee Pull Request: https://github.com/freebsd/freebsd-src/pull/1368 (cherry picked from commit 503adcdf1db35eab0f3d35392947a6da3bd19539) --- libexec/rc/rc.conf | 1 + libexec/rc/rc.d/dhclient | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index fab8ffb4fff9..6c9a58ff72c1 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -141,6 +141,7 @@ dhclient_flags="" # Extra flags to pass to dhcp client. #dhclient_flags_em0="" # Extra dhclient flags for em0 only background_dhclient="NO" # Start dhcp client in the background. #background_dhclient_em0="YES" # Start dhcp client on em0 in the background. +dhclient_arpwait="YES" # Wait for ARP resolution synchronous_dhclient="NO" # Start dhclient directly on configured # interfaces during startup. defaultroute_delay="30" # Time to wait for a default route on a DHCP interface. diff --git a/libexec/rc/rc.d/dhclient b/libexec/rc/rc.d/dhclient index e2f204076eb6..3e6511fb6f26 100755 --- a/libexec/rc/rc.d/dhclient +++ b/libexec/rc/rc.d/dhclient @@ -48,6 +48,10 @@ dhclient_prestart() rc_flags="${rc_flags} -b" fi + dhclient_arpwait=$(get_if_var $ifn dhclient_arpwait_IF $dhclient_arpwait) + if ! checkyesno dhclient_arpwait; then + rc_flags="${rc_flags} -n" + fi # /var/run/dhclient is not guaranteed to exist, # e.g. if /var/run is a tmpfs