mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-18 02:19:39 +00:00
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
This commit is contained in:
parent
84fce4b67a
commit
503adcdf1d
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user