Browse Source

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 5 years ago committed by Harald Hoyer
parent
commit
d5e818f349
  1. 2
      modules.d/35network-legacy/dhclient-script.sh

2
modules.d/35network-legacy/dhclient-script.sh

@ -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
} }



Loading…
Cancel
Save