View Issue Details

IDProjectCategoryView StatusLast Update
0004201CentOS-5dhclientpublic2010-06-24 14:06
Status newResolutionopen 
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.



2010-06-24 14:06


Actually the documentation say:
      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

Issue History

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