From 262d627cf95a674f21b93ac9870a2fc54c89f52a Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Oct 13 2015 13:28:16 +0000 Subject: dhclient-script: fix for gateway not in the end of rfc3442 routes list (#1251644) --- diff --git a/dhclient-script b/dhclient-script index 27f3d0e..f174392 100644 --- a/dhclient-script +++ b/dhclient-script @@ -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 diff --git a/dhcp.spec b/dhcp.spec index 557369e..95e2750 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -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 - 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 - 12:4.3.3-4 - dhclient-script: make_resolv_conf(): keep old nameservers if server sends domain-name/search, but no nameservers (#1269595)