dhclient-script: fix for gateway not in the end of rfc3442 routes list (#1251644)

This commit is contained in:
Jiri Popelka 2015-10-13 15:28:16 +02:00
parent 609ced7095
commit 262d627cf9
2 changed files with 7 additions and 4 deletions

View File

@ -409,6 +409,9 @@ dhconfig() {
[ -n "${new_static_routes}" ]; then
if [ -n "${new_classless_static_routes}" ]; then
IFS=', |' static_routes=(${new_classless_static_routes})
# If the DHCP server returns both a Classless Static Routes option and
# a Router option, the DHCP client MUST ignore the Router option. (RFC3442)
new_routers=""
else
IFS=', |' static_routes=(${new_static_routes})
fi
@ -417,9 +420,6 @@ dhconfig() {
for((i=0; i<${#static_routes[@]}; i+=2)); do
target=${static_routes[$i]}
if [ -n "${new_classless_static_routes}" ]; then
# If the DHCP server returns both a Classless Static Routes option and
# a Router option, the DHCP client MUST ignore the Router option. (RFC3442)
new_routers=""
if [ "${target}" = "0" ]; then
new_routers="${static_routes[$i+1]}"
continue

View File

@ -18,7 +18,7 @@
Summary: Dynamic host configuration protocol software
Name: dhcp
Version: 4.3.3
Release: 4%{?dist}
Release: 5%{?dist}
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
# dcantrell maintaining the package) made incorrect use of the epoch and
# that's why it is at 12 now. It should have never been used, but it was.
@ -663,6 +663,9 @@ done
%doc doc/html/
%changelog
* Tue Oct 13 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.3-5
- dhclient-script: fix for gateway not in the end of rfc3442 routes list (#1251644)
* Tue Oct 13 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.3-4
- dhclient-script: make_resolv_conf(): keep old nameservers
if server sends domain-name/search, but no nameservers (#1269595)