From nobody Sat Aug 10 00:00:36 2024 X-Original-To: dev-commits-src-main@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 4WggsJ5bDRz5SpWp; Sat, 10 Aug 2024 00:00:36 +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 4WggsJ2Xx2z53px; Sat, 10 Aug 2024 00:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723248036; 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=9zM3g9i9aUtbuH/Bi/LsZWLOTb0sxbcRz2or5zICC1U=; b=bE2mHiK+RpGBFg/BBqEUsLgEoSaLGT5Tdd4gDg7fjo6Pe80OVpPhotvXKIRx74IneY1OY9 T9DLAuVe6hRU1D4eTB87yu3nNkgUh+XoAsdIetxqfbg/T6KYzfpfVwYhEWWOlDm9Mp5CcH 8L7c+Ax9M3tOGbuoMByKg0KJUqi7/nqvAo9wGaesUVHrrN8qUTd2HkobALoxcFXZign0xX rObVkM1nO/DokVjVx35fJYu3pf7GW/v+GDLqTdbx82JCLYuOdSzgQz0ARuTcBOcNYQ49ms 67TFMuGXUcIombLj/aKijOL6J9jZ97NAzKfOUp1RhTh+q4kgtwEOCEXB3OcMFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723248036; a=rsa-sha256; cv=none; b=EIR91sbZbBHP3D9er4RZvLiXS8ld58H2tmggJm4AyGe06rwE04PN1zlPOP17tBO18/VNt+ Twgf90FSKk9odn+3SwIMW8YB0Y4EQZcuSn/bGSF0RvuzjXYankNH9smFU5GzY2hiprFtmz kz/fI/cQpSeG+3fffyVvw+a7S2G2wBdHmN51LgXCeX6HJ7iCuzH6CeK5GQpI+Xe1VZS/Rg lNugBy0VhKwrPyDtCRaLhKkYlSc6smYAoVRFBzmUVM0Z6nwhcGKMiP5No9hx5glkaYemRX APDi1P+7hpl1F6MN2pVWsSsocnB326nP2TehWMKNCTCOI5j2T7YMKARsL6SDVg== 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=1723248036; 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=9zM3g9i9aUtbuH/Bi/LsZWLOTb0sxbcRz2or5zICC1U=; b=qx8itNK8rXDFvY8uhlVevzbMc4lQ4dt938CuvJadOdTI31NwPkutHCXgOMQhTTLOaj4vxx cxPDkRHOyG/fZFwif2a4Cl8LNTjF9s3Pg5C+2E/ykrwH2QycoukmFC5wdWWGzEIwyRZo02 VG3PYNXTICRIXGVE1wv7BUwVGhukshkg0iabbP8WBJZ2uCVNf5UUcs2H03j/8A2EGNW+1Z LiMzBrOCl3bIsaQgAVx/zaZGLFmjbf/rJuoz+LI0M3tg3EtG+kiyCz3bBNxwFjLh12DM2N Hmm+E3LkojONfvVcb/4QyTGwo51gBuxIBblcrMyKBmQSIwLRZqci5mLqshBIVg== 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 4WggsJ26g5zd0P; Sat, 10 Aug 2024 00:00:36 +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 47A00aqR054646; Sat, 10 Aug 2024 00:00:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47A00aJL054643; Sat, 10 Aug 2024 00:00:36 GMT (envelope-from git) Date: Sat, 10 Aug 2024 00:00:36 GMT Message-Id: <202408100000.47A00aJL054643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 503adcdf1db3 - main - dhclient: rc.conf option to disable ARP resolution List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 503adcdf1db35eab0f3d35392947a6da3bd19539 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=503adcdf1db35eab0f3d35392947a6da3bd19539 commit 503adcdf1db35eab0f3d35392947a6da3bd19539 Author: Isaac Cilia Attard AuthorDate: 2024-07-13 10:07:29 +0000 Commit: Colin Percival CommitDate: 2024-08-09 21:49:51 +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 --- 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 583d4fd2970e..8f585bc02856 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -138,6 +138,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 78442da29193..1cd770031d71 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