If multiple default routes exist take the first.

This commit is contained in:
redxef 2022-09-06 16:26:00 +02:00
parent 8d2e090c81
commit f103af50f6

3
net
View file

@ -11,7 +11,8 @@ randstr() {
}
default_route() {
ip route | grep '^default' | sed -n 's/.*dev \([^ ]*\).*/\1/p'
ip route | awk '/^default/ && (NR==1) {print $5}'
}
find_next_subnet() {