RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1527995 - Classless Static Route with 0.0.0.0 GW Fails
Summary: Classless Static Route with 0.0.0.0 GW Fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: dhcp
Version: 6.9
Hardware: All
OS: Linux
urgent
medium
Target Milestone: rc
: ---
Assignee: Pavel Zhukov
QA Contact: Jan Ščotka
URL:
Whiteboard:
Depends On: 769463
Blocks: 1494484
TreeView+ depends on / blocked
 
Reported: 2017-12-20 17:50 UTC by SHAURYA
Modified: 2022-03-08 09:37 UTC (History)
9 users (show)

Fixed In Version: dhcp-4.1.1-56.P1.el6
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of: 769463
Environment:
Last Closed: 2018-06-19 05:15:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1884 0 None None None 2018-06-19 05:15:43 UTC

Description SHAURYA 2017-12-20 17:50:43 UTC
+++ This bug was initially created as a clone of Bug #769463 +++

Description of problem:

When providing a classless static route with a 0.0.0.0 next-hop address, dhclient fails. Unfortunately, multicast routes *must* have an empty next-hop address otherwise Linux will send the frame to the gateway, rather than the group MAC address.

The exact issue is at line 430 of dhclient-script, which tests if a gateway is reachable. It should special-case out 0.0.0.0 to allow static routing for link-local addresses (including IPv4 multicast) which will not have a next-hop. DHCPd does not reject these items.

Version-Release number of selected component (if applicable):

dhclient-4.2.3-4.P1.fc16.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Add option 121 to a server
2. Try to get a lease with option 121
  
Actual results:

Routes with a 0.0.0.0 next-hop are not added.

Expected results:

Routes with a 0.0.0.0 next-hop should be added as link-local/gateway-less routes.

Additional info:

Patch to dhclient-script:


--- /sbin/dhclient-script	2011-12-09 15:56:49.000000000 -0500
+++ dhclient-script	2011-12-20 17:12:46.002690685 -0500
@@ -427,7 +427,13 @@
                 fi
                 gateway=${static_routes[$i+1]}
 
-                if is_router_reachable ${gateway}; then
+		if [ "${gateway}" = "0.0.0.0" ]; then
+			valid_gateway=0
+		else
+			is_router_reachable ${gateway}
+			valid_gateway=$?
+		fi
+                if [ ${valid_gateway} -eq 0 ]; then
                     metric=''
                     for t in ${route_targets[@]}; do
                         if [ ${t} = ${target} ]; then

--- Additional comment from Jiri Popelka on 2011-12-21 06:10:34 EST ---

Thanks. What about ?

diff --git a/dhclient-script b/dhclient-script
@@ -427,7 +427,8 @@ dhconfig() {
                 fi
                 gateway=${static_routes[$i+1]}
 
-                if is_router_reachable ${gateway}; then
+                if [ "${gateway}" = "0.0.0.0" ] ||
+                   is_router_reachable ${gateway}; then
                     metric=''
                     for t in ${route_targets[@]}; do
                         if [ ${t} = ${target} ]; then

--- Additional comment from James Cape on 2011-12-21 06:28:43 EST ---

Looks like it will work. I've coiped/pasted the static routes section into /etc/dhcp/dhclient-up-hook (or whatever it's called), so I'll test with it later today.

Latest dhcpd can be used to test this by doing this:

scope ... {
  // static route for 224.0.0.0/4 to 0.0.0.0
  option classless-static-routes 4.224 0.0.0.0;
}

should end up with:

$ ip route
...
224.0.0.0/4 dev em2  proto static
$ 

on the client.

--- Additional comment from Fedora Update System on 2012-01-23 10:28:18 EST ---

dhcp-4.2.3-6.P2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/dhcp-4.2.3-6.P2.fc16

--- Additional comment from Fedora Update System on 2012-01-23 16:54:36 EST ---

Package dhcp-4.2.3-6.P2.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dhcp-4.2.3-6.P2.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-0822/dhcp-4.2.3-6.P2.fc16
then log in and leave karma (feedback).

--- Additional comment from Fedora Update System on 2012-01-27 22:32:00 EST ---

dhcp-4.2.3-6.P2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 2 Pavel Zhukov 2017-12-20 20:48:39 UTC
Red Hat Enterprise Linux 6 transitioned to the Production 3 Phase on May 10, 2017.  During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:
http://redhat.com/rhel/lifecycle

This issue does not appear to meet the inclusion criteria for the Production Phase 3 and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification.  Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com

Comment 22 errata-xmlrpc 2018-06-19 05:15:18 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:1884


Note You need to log in before you can comment on or make changes to this bug.