mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-24 01:42:58 +02:00
networking: Allow changing DHCP Option Rapid Commit
This option needs to be configurable since some (braindead) ISPs have started running broken DHCP servers to be bug-compatible with cheap broken plastic routers. By default we keep this option enabled, but it can now be turned off whenever needed. Suggested-by: Adolf Belka <adolf.belka@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org> Tested-by: Adolf Belka <adolf.belka@ipfire.org> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
committed by
Arne Fitzenreiter
parent
7350feee58
commit
c6282b001b
@@ -171,9 +171,20 @@ case "${1}" in
|
||||
# To determine this we check if a wpa_supplicant is running.
|
||||
pid="$(pidof wpa_supplicant)"
|
||||
|
||||
DHCPCD_ARGS=()
|
||||
|
||||
# Enable Rapid Commit (enabled by default)
|
||||
case "${RED_DHCP_RAPID_COMMIT}" in
|
||||
""|yes|true|on)
|
||||
DHCPCD_ARGS+=( "--option" "rapid_commit" )
|
||||
;;
|
||||
esac
|
||||
|
||||
echo dhcpcd_start "${DEVICE}" "${DHCPCD_ARGS[@]}"
|
||||
|
||||
if [ -z "${pid}" ]; then
|
||||
# No wpa_supplicant is running. So it's save to start dhcpcd.
|
||||
dhcpcd_start "${DEVICE}"
|
||||
dhcpcd_start "${DEVICE}" "${DHCPCD_ARGS[@]}"
|
||||
fi
|
||||
|
||||
elif [ "$TYPE" == "PPPOE" ]; then
|
||||
|
||||
Reference in New Issue
Block a user