Skip to content

Commit

Permalink
fix(network): two bugs which cause minutes long boot times
Browse files Browse the repository at this point in the history
Caused by unneeded arping to the default gateway.
  • Loading branch information
tuppero authored and LaszloGombos committed Dec 17, 2022
1 parent 037eda7 commit 1d6f42c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules.d/40network/net-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ all_ifaces_setup() {

get_netroot_ip() {
local prefix="" server="" rest=""
splitsep "$1" ":" prefix server rest
splitsep ":" "$1" prefix server rest
case $server in
[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)
echo "$server"
Expand All @@ -101,7 +101,8 @@ get_netroot_ip() {
}

ip_is_local() {
strstr "$(ip route get "$@" 2> /dev/null)" " via "
strstr "$(ip route get "$@" 2> /dev/null)" " via " || return 0
return 1
}

ifdown() {
Expand Down

0 comments on commit 1d6f42c

Please sign in to comment.