35network-legacy: using 'replace' instead of 'add' to add route

This is a simple trick to honor RFC 3442:
If the DHCP server returns both a Classless Static Routes option and
a Router option, the DHCP client MUST ignore the Router option.

Signed-off-by: Jacob Wen <jian.w.wen@oracle.com>
master
Jacob Wen 2019-11-26 15:50:36 +08:00 committed by Harald Hoyer
parent 4598b5540e
commit d5e818f349
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ parse_option_121() {
temp_result="$destination via $gateway dev $interface" temp_result="$destination via $gateway dev $interface"
fi fi


echo "/sbin/ip route add $temp_result" echo "/sbin/ip route replace $temp_result"
done done
} }