This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 824622 - dhclient-script should honor PEERDNS on quit
dhclient-script should honor PEERDNS on quit
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: dhcp (Show other bugs)
6.3
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Jiri Popelka
Release Test Team
:
Depends On: 824053
Blocks: 824621
  Show dependency treegraph
 
Reported: 2012-05-23 16:39 EDT by Mike Burns
Modified: 2013-02-21 03:23 EST (History)
7 users (show)

See Also:
Fixed In Version: dhcp-4.1.1-33.P1.el6
Doc Type: Bug Fix
Doc Text:
Cause Any service runs dhclient (either directly or via other service), changes /etc/resolv.conf and sets PEERDNS=no in /etc/sysconfig/network-scripts/ifcfg-<iface> to prevent dhclient from editing /etc/resolv.conf. Then it stops dhclient (directly or via other service). Consequence Dhclient rewrites /etc/resolv.conf with backup even with PEERDNS set to "no". Fix Code for backing up and restoring of /etc/resolv.conf was removed from dhclient-script. Result dhclient doesn't rewrite /etc/resolv.conf when stopped.
Story Points: ---
Clone Of: 824053
Environment:
Last Closed: 2013-02-21 03:23:46 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Mike Burns 2012-05-23 16:39:24 EDT
+++ This bug was initially created as a clone of Bug #824053 +++

Description of problem:
If /etc/resolv.conf is changed while dhclient is running (with PEERDNS=yes), /etc/resolv.conf get's overwritten even if PEERDNS was set to "no" befor it was shutdown.

How reproducible:
Always

Steps to Reproduce:
See bug #822930
  
Actual results:
/etc/resolv.conf is empty (or contains previous data)


Expected results:
/etc/resolv.conf is not touched

Additional info:
This is just a problem if dhclient started with PEERDNS=yes and quits with PEERDNS=no (so the user expects dhclient no to touch resolv.conf)
Comment 1 Mike Burns 2012-05-23 16:48:24 EDT
Comment 1 from 824053:

I already removed this /etc/resolv.conf backup&restore part of dhclient-script in F-17:
http://pkgs.fedoraproject.org/gitweb/?p=dhcp.git;a=commitdiff;h=1e3f54a9ec3e1610b8ad4920c6c6b0c4c80a1e22

I'm closing as fixed in rawhide. Feel free to reopen if you need to have this fixed in F-16.
Comment 5 Jiri Popelka 2012-08-24 10:16:00 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
Any service runs dhclient (either directly or via other service), changes /etc/resolv.conf and sets PEERDNS=no in /etc/sysconfig/network-scripts/ifcfg-<iface> to prevent dhclient from editing /etc/resolv.conf. Then it stops dhclient (directly or via other service).

Consequence
Dhclient rewrites /etc/resolv.conf with backup even with PEERDNS set to "no".

Fix
Code for backing up and restoring of /etc/resolv.conf was removed from dhclient-script.

Result
dhclient doesn't rewrite /etc/resolv.conf when stopped.
Comment 7 Ladislav Jozsa 2012-09-25 11:30:25 EDT
Verified on RHEL6, dhclient-4.1.1-34.P1.el6.x86_64. /etc/resolv.conf isn't modified when PEERDNS set to 'no' and dhclient is stopped.
Comment 8 errata-xmlrpc 2013-02-21 03:23:46 EST
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.

http://rhn.redhat.com/errata/RHSA-2013-0504.html

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