Bug 1595412

Summary: dhcp: router outside client subnet mask no longer works
Product: Red Hat Enterprise Linux 6 Reporter: Chris Cheney <ccheney>
Component: dhcpAssignee: Pavel Zhukov <pzhukov>
Status: CLOSED ERRATA QA Contact: Ondrej Mejzlik <omejzlik>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.10CC: dchong, fkrska, jenander, lmanasko, lpol, mkolaja, pzhukov, thozza, toneata, zmarano
Target Milestone: rcKeywords: Patch, Regression
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, due to incorrect handling of classless static routes in the dhclient script, routing was not set properly. As a consequence, network connections on Google Compute Engine machines did not work. This update fixes handling of classless static routes and network connection works as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-10 17:54:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Cheney 2018-06-26 21:36:55 UTC
Description of problem:

If a client is given a subnet mask where the router is outside of it as of dhclient 4.1.1-60 it no longer works due to the change to fix BZ#1527995.

This appears to be due to the fact it won't run the code unless is_router_reachable is true, which was not the case previously.


diff -Nruab 4.1.1-53/dhclient-script 4.1.1-60/dhclient-script
--- 4.1.1-53/dhclient-script    2018-06-26 14:10:21.882181860 -0500
+++ 4.1.1-60/dhclient-script    2018-06-26 14:10:30.438209325 -0500
@@ -451,6 +451,17 @@
                 fi
                 gateway=${static_routes[$i+1]}

+                # special case 0.0.0.0 to allow static routing for link-local addresses
+                # (including IPv4 multicast) which will not have a next-hop (#769463, #787318)
+                if [ "${gateway}" = "0.0.0.0" ]; then
+                    valid_gateway=0
+                    scope='scope link'
+                else
+                    is_router_reachable ${gateway}
+                    valid_gateway=$?
+                    scope=''
+                fi
+                if [ ${valid_gateway} -eq 0 ]; then
                 metric=''
                 for t in ${route_targets[@]}; do
                     if [ ${t} = ${target} ]; then

Comment 8 Pavel Zhukov 2018-06-27 08:25:34 UTC
Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=1102830

Comment 24 errata-xmlrpc 2018-07-10 17:54:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:2163