From nobody Tue Aug 20 04:58:20 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 4Wny0F1P4Cz5VG0J; Tue, 20 Aug 2024 04:58:21 +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 4Wny0F02Xyz4Nkm; Tue, 20 Aug 2024 04:58:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724129901; 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=A8+j7ZXUGDhCK9Tw09eyx1B49Z0p83l/irGHnjomN2E=; b=bnrDX4HsCB6p+8uxVBTsoRzVpQ5c5jjoc2XwcQfDYwZK4wFPgonNryfa6Y/n0sGdBN4tMc 9SVdxxidabSm03tduE3VmWEF+BW0km9MbM/z/MKF2PhteApk/wSYHchI0ECjx017+TsTeQ 59QQuoFObYqIFCTBrXLdGWHJ0ebfjshCC9otdd9yFNmX8MMCKETU7oRdviYawOQ6iAziJ9 GMmaYWpe22tIyI05712Dl2wixcMFZQQDZcGMNxwg5Sjbb1aceFzU+MjBfsnaQMNf/kHh8f 8aXItGNF8jYx+WXzUFxAquClk5jC+M9AkvhwSxMBk5xlz85gB9YSCShIbTfclw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724129901; a=rsa-sha256; cv=none; b=ur1dTSP21UbOlK1BLTDHFJjS0VgipN5CQl5gktgDy6koQzGOZofAoKpfPuYoOaFROZfxD4 1Ffunvfl3vco8pjxuoc+Z4zg1zMRG4XVs62bzL9vIkSFKWU7sDCvl0gndu2gyxpwzY7M1B OxHKHEVTHQ8Sq0MSDn7Ry2CAhruyZpREKXffa2fhSw7XR1QO2SyDSyzxjYZJ7VOT6Lhw5f dZoMaW/GJCn0QKjSKnCDZZOr81FK9uLhfp7rJeZaFHioi+abm7XvLHgx/30Eyjt7cdidPM pSirEfRqF4MHL3cZyV2gH9Bq9uw/12iCpd51hlCZrIp970PxxoZEB9px/EzfyA== 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=1724129901; 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=A8+j7ZXUGDhCK9Tw09eyx1B49Z0p83l/irGHnjomN2E=; b=P+dFMU/K5Jx28qh1NMshGh1D1I+A6V70GbHUjhX6TptTksamIjVMTxERFRvdLgiL44sQdS 9+J+Or5poHsyKhf+IkuB3r2ljoox/4/JY4EI9HjfjYmlko48pAItJVAONI6An6RQD9TOtZ Cb8+ZOOr84XOo//WEKqi6EMZmy3K/Ag6SSx4T3A9rqCJM0cr/0aS3U//5PHAraKRaJYsPA 3vqMkfbRSC/2v+qxO88tnFC+8El57iKcfpEa6KnBj40dBWM99C14ps054X6CkE3G9Vti7F 7v4ZkHsFZpEkOhB8jHjwkkJmLfCErRk0O5gszMYAtibVCMBjfKdVrjoHb6q3kw== 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 4Wny0D6mkKzlqp; Tue, 20 Aug 2024 04:58:20 +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 47K4wKCS054354; Tue, 20 Aug 2024 04:58:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47K4wKtf054351; Tue, 20 Aug 2024 04:58:20 GMT (envelope-from git) Date: Tue, 20 Aug 2024 04:58:20 GMT Message-Id: <202408200458.47K4wKtf054351@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: 54bd53672395 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 54bd53672395c9902058da58cf7c9d4443785e5a Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=54bd53672395c9902058da58cf7c9d4443785e5a commit 54bd53672395c9902058da58cf7c9d4443785e5a Author: Isaac Cilia Attard AuthorDate: 2024-07-13 10:07:29 +0000 Commit: Colin Percival CommitDate: 2024-08-20 04:57:09 +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 5073718e91f4..8b56a490b5ec 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -144,6 +144,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