1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00
Commit Graph

277840 Commits

Author SHA1 Message Date
Andrew Turner
39757e1068 buf_ring: Ensure correct ordering of loads
When enqueueing on an architecture with a weak memory model ensure
loading br->br_prod_head and br->br_cons_tail are ordered correctly.

If br_cons_tail is loaded first then other threads may perform a
dequeue and enqueue before br_prod_head is loaded. This will mean the
tail is one less than it should be and the code under the
prod_next == cons_tail check could incorrectly be skipped.

buf_ring_dequeue_mc has the same issue with br->br_prod_tail and
br->br_cons_head so needs the same fix.

Reported by:	Ali Saidi <alisaidi@amazon.com>
Co-developed by: Ali Saidi <alisaidi@amazon.com>
Reviewed by:	imp, kib, markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D46155

(cherry picked from commit fe2445f47d)
2024-09-02 10:11:57 +01:00
Andrew Turner
74538cec0c buf_ring: Use atomic operations with br_prod_tail
As with br_cons_tail use an atomic load acquire to read br_prod_tail
in buf_ring_dequeue_mc and buf_ring_peek*.

On dequeue we need to ensure we don't read the entry from the buf_ring
until it is available and prod_tail has updated. There is already an
appropriate store in the enqueue path and an appropriate load in the
single consumer dequeue, we just need one in the other functions that
read from the buf_ring.

Reviewed by:	imp, markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D46154

(cherry picked from commit 947754af55)
2024-09-02 10:11:57 +01:00
Andrew Turner
b5410efe42 buf_ring: Remove old arm-only dequeue code
In the single consumer dequeue the consumer thread controls
br_cons_head. As such no ordering between this and other data are
required.

Reviewed by:	alc, imp, kib, markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D46153

(cherry picked from commit 7eb0fffc77)
2024-09-02 10:11:57 +01:00
Andrew Turner
3c15d02bb8 buf_ring: Use atomic operations with br_cons_tail
Use an atomic operation with a memory barrier loading br_cons_tail
from the producer thread and storing to it in the consumer thread.

On dequeue we need to read the pointer value from the buf_ring before
moving the consumer tail as that indicates the entry is available to be
used. The store release atomic operation guarantees this.

In the enqueueing thread we then need to use a load acquire atomic
operation to ensure writing to this entry can only happen after the
tail has been read and checked.

Reported by:	Ali Saidi <alisaidi@amazon.com>
Co-developed by: Ali Saidi <alisaidi@amazon.com>
Reviewed by:	markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D46152

(cherry picked from commit 44e1cfca41)
2024-09-02 10:11:57 +01:00
Andrew Turner
7ab1392355 buf_ring: Keep the full head and tail values
If a thread reads the head but then sleeps for long enough that
another thread fills the ring and leaves the new head with the
expected value then the cmpset can pass when it should have failed.

To work around this keep the full head and tail value and use the
upper bits as a generation count.

Reviewed by:	kib
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D46151

(cherry picked from commit 3cc603909e)
2024-09-02 10:11:57 +01:00
Andrew Turner
351c7a18d4 buf_ring: Consistently use atomic_*_32
We are operating on uint32_t values, use uint32_t atomic functions.

Reviewed by:	alc, imp, kib, markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D46150

(cherry picked from commit 17a597bc13)
2024-09-02 10:11:57 +01:00
Andrew Turner
0f85e71ab5 buf_ring: Support DEBUG_BUFRING in userspace
The only part of DEBUG_BUFRING we don't support in userspace is the
mutex checks. Add _KERNEL checks around these so we can enable the
extra debugging.

Reviewed by:	alc, imp, kib, markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D46149

(cherry picked from commit d3d34d56be)
2024-09-02 10:11:57 +01:00
Andrew Turner
6793d9305b buf_ring: Remove PREFETCH_DEFINED
I'm not able to find anything in the tree that ever defined it. Remove
as it's unused so is untested.

Reviewed by:	alc, imp, kib, markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D46148

(cherry picked from commit 5048308bdb)
2024-09-02 10:11:57 +01:00
Mark Johnston
292b2f9c5d buf_ring: Make buf_ring.h amenable to userspace compilation
This will be useful for adding test cases.

Reviewed by:	andrew
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45869

(cherry picked from commit a161269b24)
2024-09-02 10:11:57 +01:00
Andrew Turner
556739a53c dev/uart: Add APMC0D08 as found in the Intel E2100
This uart has the requirement for 32-bit sized and aligned memory
accesses. It is also described in the Serial Port Console Redirection
Table (SPCR) with a different interface type value.

Reviewed by:	imp
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45834

(cherry picked from commit 9840598aa3)
2024-09-02 10:11:57 +01:00
Andrew Turner
e70860e519 arm64: Ensure sctlr and pstate are in known states
Before entering the kernel exception level ensure sctlr_el2 and
sctlr_el1 are in a known state. The EOS flag needs to be set to ensure
an eret instruction is a context synchronization event.

Set spcr_el1 when entering the kernel from EL1 and use an eret
instruction to return to the caller. This ensures the CPU pstate is
consistent with the value in spcr_el1 as it is the only way to set it
directly.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45528

(cherry picked from commit 034c83fd7d)
2024-09-02 10:11:57 +01:00
Andrew Turner
af603143e8 arm64: Fix the gicv3 check in locore.S
In locore.S we need to configure access to the GICv3. To check if it's
available we read the id_aa64pfr0_el1 register, however we then only
check if a GICv3.0 or 4.0 is present. If the system has a GICv4.1 this
check would fail.

Move to checking if the GICV3+ is not absent so this will still work if
the field is updated again.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45530

(cherry picked from commit 57ef7935eb)
2024-09-02 10:11:57 +01:00
Andrew Turner
10595e9b2f arm64: Support counter access with E2H
When entering the kernel with the E2H field set the layout of the
cnthctl_el2 register changes. Use the correct field locations to enable
access to the counter and timer registers from EL1.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45529

(cherry picked from commit 997511dffe)
2024-09-02 10:11:57 +01:00
Andrew Turner
e4f7410917 uart: Split out initilisation of the acpi devinfo
Split out the common parts of building the uart devinfo from ACPI
tables from the SPCR parser. This will be used when we support the DBG2
table to find the debug uart to be used by the kernel gdb stub.

Reviewed by:	imp
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D44357

(cherry picked from commit 473c0b44ae)
2024-09-02 10:11:57 +01:00
Andrew Turner
8876ff3c4a vm: Add kva_alloc_aligned
Add a function like kva_alloc that allows us to specify the alignment
of the virtual address space returned.

Reviewed by:	alc, kib, markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42788

(cherry picked from commit 839999e7ef)
2024-09-02 10:11:57 +01:00
Andrew Turner
c603969fa9 vm: Use vmem_xalloc in kva_alloc
The kernel_arena used in kva_alloc has the qcache disabled. vmem_alloc
will first try to use the qcache before falling back to vmem_xalloc.

Rather than trying to use the qcache in vmem_alloc just call
vmem_xalloc directly.

Reviewed by:	alc, kib, markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42831

(cherry picked from commit 8daee410d2)
2024-09-02 10:11:57 +01:00
Zhenlei Huang
38ffc3f319 kern: Align the declaration of kernconfstring with its definition
It is defined as const char[] in config.c which is auto generated by
usr.sbin/config/kernconf.tmpl .

While here prefer macro SYSCTL_CONST_STRING to avoid casting.

MFC after:	1 week

(cherry picked from commit 0f64fc6a34)
(cherry picked from commit d6271b6507)
2024-09-02 13:03:41 +08:00
Zhenlei Huang
5863982b3d init_main: Sprinkle const qualifiers where appropriate
No functional change intended.

MFC after:	1 week

(cherry picked from commit 7412517f29)
(cherry picked from commit b6728c3f0b)
2024-09-02 13:03:41 +08:00
Franco Fichtner
feb14552cc u3g: add SIERRA AC340U
Pull request:	https://github.com/freebsd/freebsd-src/pull/1397

(cherry picked from commit 4b6e76eff8)
2024-09-01 21:46:43 -07:00
Vincenzo Maffione
574f00950d libnetmap: remove interface name validation
When trying to use a VLAN device (e.g. "em0.123") with a dot
the library fails to parse the interface correctly. The former
pattern is much too restrictive given that almost all characters
can be coerced into a device name via ifconfig.

Remove the particularly restrictive validation.  Some characters
still cannot be used as an interface name as they are used as
delimiters in the syntax, but this allows to be able to use most
of them without an issue.

Submitted by:	franco@opnsense.org
Differential Revision:	https://reviews.freebsd.org/D42485
Reviewed by:	vmaffione

(cherry picked from commit ad874544d9)
2024-09-01 17:54:48 +00:00
Simon J. Gerraty
2d203f534b bmake/unit-tests/Makefile use _shell
Set _shell like later versions of bmake so that .SHELL
does not appear in conditionals.

This avoids errors when an older version of bmake parses this makefile
such as when doing src upgrade from stable/12 or older.

Direct commit to stable/13 since this is the only branch where
this issue arrises.

PR:		281151
2024-08-31 23:29:19 -07:00
Gordon Tetlow
b8abafb4de
release: Redirect etcupdate logfile to /dev/null.
Stop shipping a log file for etcupdate. This is a source of
non-reproducability as it uses mktemp thereby guaranteeing the output is
different each run.

Differential Revision:	https://reviews.freebsd.org/D46317

(cherry picked from commit e972e408d1)
2024-08-31 09:18:49 -07:00
Rick Macklem
6bde10b638 nfsproto.h: Define the new mode_umask attribute
RFC8275 defines a new attribute as an extension to NFSv4.2
called MODE_UMASK.  This patch adds the attribute number
to nfsproto.h.

Future patches will add optional support for the attribute.
This patch does not cause any semantics change.

(cherry picked from commit 10d5b43424)
2024-08-30 19:02:57 -07:00
Michael Tuexen
a1b4e57317 tcp: fix format of sysctl variable
The format for CTLTYPE_UINT is "IU" instead of "UI" as specified
in sysctl.9.

Reviewed by:		cc, zlei
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D46408

(cherry picked from commit 498286d4e8)
2024-08-30 08:47:03 +02:00
Michael Tuexen
0e6dbb6732 sctp: fix format of sysctl variables
(cherry picked from commit a1d9ce19b1)
2024-08-30 08:46:24 +02:00
Michael Tuexen
c467031b61 tcp: improve consistency of SYN-cache handling
Originally, a SYN-cache entry was always allocated and later freed,
when not needed anymore. Then the allocation was avoided, when no
SYN-cache entry was needed, and a copy on the stack was used.
But the logic regarding freeing was not updated.
This patch doesn't re-check conditions (which may have changed) when
deciding to insert or free the entry, but uses the result of
the earlier check.
This simplifies the code and improves also consistency.

Reviewed by:		glebius
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D46410

(cherry picked from commit e41364711c)
2024-08-30 08:45:44 +02:00
Michael Tuexen
5420e4f563 tcp: initialize the LRO hash table with correct size
There will at most lro_entries entries in the LRO hash table. So no
need to take lro_mbufs into account, which only results in the
LRO hash table being too large and therefore wasting memory.

Reviewed by:		rrs
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D46378

(cherry picked from commit aa6c490bf8)
2024-08-30 08:44:35 +02:00
Warner Losh
e95ffda78a loader.efi(8): beef up the updating the ESP
There's a huge variety of situations when booting with UEFI. Document
more of them, hopefully better.

Feedback from: jrtc27
MFC After: 3 days
Sponsored by:		Netflix

(cherry picked from commit 871911a4ab)
2024-08-29 12:14:09 -06:00
Kristof Provost
6b3bfb16e5 pf: cope with SCTP port re-use
Some SCTP implementations will abort connections and then later re-use the same
port numbers (i.e. both src and dst) for a new connection, before pf has fully
purged the old connection.

Apply the same hack we already have for similarly misbehaving TCP
implementations and forcibly remove the old state so we can create a new one.

MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 82e021443a)
2024-08-27 14:17:59 +02:00
Ed Maste
51768dc31d ctl: avoid heap info leak in ctl_request_sense
Previously 3 bytes of data from the heap could be leaked to ctl
consumers.

Reported by:	Synacktiv
Reviewed by:	asomers, mav
Sponsored by:	The Alpha-Omega Project
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46091

(cherry picked from commit db87c98168)
(cherry picked from commit 131b7dcb2f)
2024-08-26 09:28:17 -04:00
Ed Maste
6a847b6d1e linux.4: clarify path translation
Try to be a little more explicit about the path translation mechanism
accessing /compat/linux/<path> then falling back to /<path>.

As suggested by martin@lispworks.com, refer to the compat path
explicitly, and correct an existing grammaro.

PR:		277804
Reviewed by:	fernape
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit f66e71fa78)
(cherry picked from commit d1daec3d35)
(cherry picked from commit 226c733737)
2024-08-26 09:22:58 -04:00
Oliver Fromme
cb8f15aeed amdsmn(4), amdtemp(4): add support for AMD Ryzen 7 "Phoenix" processors
Adds support for AMD Ryzen 7 "Phoenix" processors (family 0x19,
model 0x70-0x7f) to the amdsmn(4) and amdtemp(4) drivers. This
enables temperature readings of these CPUs via sysctl.

The sensors function identically to those for the "Raphael" processors
(model 0x60-0x6f); only the PCI device ID differs.

PR:		kern/280942
Relnotes:	yes
MFC after:	3 days

(cherry picked from commit ef3f8aa0a0)
2024-08-25 22:17:17 -07:00
Eugene Grosbein
f20a1805f7 libalias: fix subtle racy problem in outside-inside forwarding
sys/netinet/libalias/alias_db.c has internal static function UseLink()
that passes a link to CleanupLink() to verify if the link has expired.
If so, UseLink() may return NULL.

_FindLinkIn()'s usage of UseLink() is not quite correct.

Assume there is "redirect_port udp" configured to forward incoming
traffic for specific port to some internal address.
Such a rule creates partially specified permanent link.

After first such incoming packet libalias creates new fully specified
temporary LINK_UDP with default timeout of 60 seconds.
Also, in case of low traffic libalias may assign "timestamp"
for this new temporary link way in the past because
LibAliasTime is updated seldom and can keep old value
for tens of seconds, and it will be used for the temporary link.

It may happen that next incoming packet for redirected port
passed to _FindLinkIn() results in a call to UseLink()
that returns NULL due to detected expiration.
Immediate return of NULL results in broken translation:
either a packet is dropped (deny_incoming mode) or delivered to
original destination address instead of internal one.

Fix it with additional check for NULL to proceed with a search
for original partially specified link. In case of UDP,
it also recreates temporary fully specified link
with a call to ReLink().

Practical examples are "redirect_port udp" rules for unidirectional
SYSLOG protocol (port 514) or some low volume VPN encapsulated in UDP.

Thanks to Peter Much for initial analysis and first version of a patch.

Reported by:	Peter Much <pmc@citylink.dinoex.sub.org>
PR:		269770

(cherry picked from commit 8132e95909)
(cherry picked from commit e5b8538083)
2024-08-25 13:42:12 +07:00
Cy Schubert
7217d74d10 unbound: Vendor import 1.21.0
Release notes at
	https://nlnetlabs.nl/news/2024/Aug/15/unbound-1.21.0-released/

Merge commit '96ef46e5cff01648c80c09c4364d10bc6f58119d'

(cherry picked from commit 5685098846)
2024-08-23 12:30:49 -07:00
Cy Schubert
14b5a068c5 unbound: Remove backup file
Upstream unbound includes a backup configure file which is distributed
in the upstream tarball. It must be created by their release process and
not deleted prior to packaging the tarball. I've received two emails so
far asking about it. Let's remove it so nobody else asks about it.

(cherry picked from commit 51c8a9c1be)
2024-08-23 12:30:49 -07:00
Colin Percival
a926bf9254 Modernize DVD package set in preparation for 14.1
[MFC note: We're making the same changes for 13.4.]

Remove archivers/unzip (now in base) and emulators/linux_base-c7 (old
and unlikely to be useful without other linux packages being installed),
ports-mgmt/portmaster (now largely obsolete and discouraged in favour
of using pkg and binary packages) and x11-drivers/xf86-video-vmware
(questionably useful).

Replace devel/git with devel/git@lite (sufficient for most purposes),
and adjust the "ensure the ports exist to sanitize the list" code to
ignore the @lite part when checking that /usr/ports/devel/git exists.

Add sysutils/seatd and x11-wm/sway for wayland support.

MFC after:	1 minute
Differential Revision:	https://reviews.freebsd.org/D45278
2024-08-22 14:59:53 -07:00
Graham Perrin
6becc61b94 pkg-stage.sh: add x11/sddm
MFC After: 2 days
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/996
2024-08-22 14:59:53 -07:00
Kristof Provost
b75115dfd4 pf tests: ensure temporary files end up in the atf working directory
Many of the tests create temporary files. pid files, log files, tcpdump
captures, ... We should take care to ensure they're stored in the temporary
working directory Kyua creates rather than in the root directory.

This ensures there are no conflicts between simultaneously running tests, and
also keeps the root directory clean.

MFC after:	1 month
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit b0fcf4d522)
2024-08-22 09:36:06 +02:00
Andre Albsmeier
8dfa4e5b6c tail -F: fix crash
PR:	280910

(cherry picked from commit 308399a179)
2024-08-21 13:34:06 +03:00
Mike Karels
cd13258d26 pw userdel: destroy home dataset if empty
When removing a user's home directory, if the directory is a ZFS
dataset, it cannot be removed.  If the directory has been emptied,
use "zfs destroy" to destroy it.  This complements the automatic
dataset creation in adduser.  Note that datasets within the directory
and snapshots are not handled, as the complete path is not constructed.

While here, add waitpid() calls to rmat() and pw_user_del().

Reviewed by:	des
Differential Revision:	https://reviews.freebsd.org/D45348

(cherry picked from commit d2f1f71ec8)
2024-08-21 12:31:22 +02:00
Dag-Erling Smørgrav
8398c81b7c adduser: Better document ZFS dataset creation.
MFC after:	3 days
PR:		280873
Reviewed by:	bcr
Differential Revision:	https://reviews.freebsd.org/D46316

(cherry picked from commit 9ff2ebd928)
2024-08-21 12:29:26 +02:00
Mike Karels
da384ffbd5 adduser: create dataset only if home is directly within dataset
Currently, if the prefix of the new home directory is a subdirectory
of a ZFS dataset, adduser will create a new dataset up one or more
levels from the intended destination.  "pw useradd" will then create
a normal directory in the desired location, leaving an unused dataset.
Check for this situation when determining whether to create a dataset,
and let pw create the directory.

Reviewed by:	des
Differential Revision:	https://reviews.freebsd.org/D45229
MFC after:	3 days

(cherry picked from commit 0b39b2e2dd)
2024-08-21 12:29:26 +02:00
Kristof Provost
5f3f07397a pf: invert direction for inner icmp state lookups
(e.g. traceroute with icmp)
ok henning, jsing

Also extend the test case to cover this scenario.

PR:		280701
Obtained from:	OpenBSD
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 89f6723288)
2024-08-20 09:25:21 +02:00
Kristof Provost
7024e1066d pf tests: ensure that traceroutes using ICMP work
PR:		280701
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 34063cb714)
2024-08-20 09:21:57 +02:00
Kristof Provost
0d8d4cc3ea pf: fix icmp-in-icmp state lookup
In 534ee17e6 pf state checking for ICMP(v6) was made stricter. This change
failed to correctly set the pf_pdesc for ICMP-in-ICMP lookups, resulting in ICMP
error packets potentially being dropped incorrectly.
Specially, it copied the ICMP header into a separate variable, not into the
pf_pdesc.

Populate the required pf_pdesc fields for the embedded ICMP packet's state lookup.

PR:		280701
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 2da98eef1f)
2024-08-20 09:21:51 +02:00
Colin Percival
bc29564fee EC2: Set dhclient_arpwait="NO"
The DHCP server in EC2 knows exactly which system should be using
which IP address (and in fact EC2 has source IP filtering on by
default) so there's no point ARPing an address before using it.

The preceding commits (changing the ARP wait time from 2 s to 250 ms)
and this one (eliminating the wait entirely in EC2) reduce the time
required for a newly launched FreeBSD/EC2 instance to launch by 2
seconds.

Discussed with:	icattard
MFC after:	10 days
Sponsored by:	Amazon

(cherry picked from commit 54a543d5ea)
2024-08-19 22:01:34 -07:00
Isaac Cilia Attard
47f6b848e0 dhclient: Update rc.conf.5 with dhclient_arpwait
Add new dhclient_arpwait option to rc.conf.5, with information about
what it does, and cases in which it could be disabled.

Sponsored by:	Google LLC (GSoC 2024)
Signed-off-by:	Isaac Cilia Attard <icattard@FreeBSD.org>
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 e4482bfde9)
2024-08-19 21:58:36 -07:00
Isaac Cilia Attard
1f0f31f082 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 <icattard@FreeBSD.org>
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 503adcdf1d)
2024-08-19 21:58:36 -07:00
Isaac Cilia Attard
8adfd40204 dhclient: Update dhclient man page for n flag
Document new n flag for disabling ARP resolution within dhclient.

Sponsored by:	Google LLC (GSoC 2024)
Signed-off-by:	Isaac Cilia Attard <icattard@FreeBSD.org>
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 84fce4b67a)
2024-08-19 21:58:36 -07:00
Isaac Cilia Attard
5f4e11e111 dhclient: Make arp_timeout configurable
Make arp_timeout available to dhclient.c, set the default timeout to 250
ms, and provide a new command-line argument, 'n' for setting the timeout
to 0.

Sponsored by:	Google LLC (GSoC 2024)
Signed-off-by:	Isaac Cilia Attard <icattard@FreeBSD.org>
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 b51569ad3c)
2024-08-19 21:58:36 -07:00