2017-05-24 09:41 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004201CentOS-5dhclientpublic2010-06-24 14:06
Reporterwalter 
PrioritynormalSeveritymajorReproducibilityalways
StatusnewResolutionopen 
Product Version5.4 
Target VersionFixed in Version 
Summary0004201: /sbin/dhclient-script gets DHCLIENT_IGNORE_GATEWAY test backwards
DescriptionWhen DHCLIENT_IGNORE_GATEWAY is set to yes in /etc/sysconfig/network-scripts/ifcfg-*, dhclient-script is supposed to ignore the default gateway sent by the DHCP server. As far as I can tell, the logic is exactly backward; setting DHCLIENT_IGNORE_GATEWAY to "no" yields the correct behaviour. The test in /sbin/dhclient-script line 276 seems to be wrong:

if [[ ( ( -z "$GATEWAYDEV" ) || ( "$GATEWAYDEV" = "$interface" ) ) && ( ( -z "$GATEWAY" ) || ( ( -n "$DHCLIENT_IGNORE_GATEWAY" ) && ( "$DHCLIENT_IGNORE_GATEWAY" = [Yy]* ) ) ) ]]; then

When I change the Yy to Nn it works correctly.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0011533

wolfy (developer)

Actually the documentation say:
    DHCLIENT_IGNORE_GATEWAY=yes|no|1|0
      If set to 'yes', it will cause dhclient-script to ignore any $GATEWAY
      setting that may be in the ifcfg file for this interface.
      Otherwise, the dhclient session which obtains an ip-address
      on the same subnet as $GATEWAY will set the default route
      to be via $GATEWAY, and no other dhclient session will set
      the default route.

So the behaviour is exactly the documented one
+Notes

-Issue History
Date Modified Username Field Change
2010-02-16 15:39 walter New Issue
2010-06-24 14:06 wolfy Note Added: 0011533
+Issue History