Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1101149

Summary: dhclient-script -6 ignores name-servers/domain-search in stateless DHCPv6 mode (-S)
Product: Red Hat Enterprise Linux 7 Reporter: Sohny <sohnykernel>
Component: dhcpAssignee: Jiri Popelka <jpopelka>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: dustin, kumuda, ljozsa, praiskup, thozza
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: dhcp-4.2.5-29.el7 Doc Type: Bug Fix
Doc Text:
Cause Running dhclient in stateless DHCPv6 mode, i.e. with '-S' command line option. Consequence Configuration parameters (like name-servers or domain-search) obtained from server are never applied due to bug in dhclient-script. Fix Bug in dhclient-script was fixed. Result Configuration parameters obtained from server are correctly applied.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 10:35:44 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 Sohny 2014-05-26 09:33:32 UTC
Description of problem:The IPV6 info of nameserver sent over by the server is getting ignored if there no new IP address being assigned to the interface

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


How reproducible:
dhclient-4.2.5-27
dhcp-common-4.2.5-27

Steps to Reproduce:
1.setup a server that can send over a namserver info for DHCPv6 
 remove or empty /etc/resolv.conf
2. Call dhclient with following info
      dhclient -6  -nw -S eth0
3. do cat /etc/resolv.conf

Actual results:
The above steps returns an empty file 

Expected results:
It should actually return as follows
; generated by /usr/sbin/dhclient-script
search somenet.org
nameserver 3ffe:501:ffff:100:200:ff:fe00:a0a0


Additional info:
This was found while running TAHI test for IPv6 on DNS discovery under Conformance test

Comment 1 Sohny 2014-05-26 09:39:35 UTC
If I change the dhclient steps as follows it works just fine

@@ -596,6 +596,11 @@ dh6config() {
             ;;

         RENEW6|REBIND6)
+
+           if [ ! "${new_dhcp6_name_servers}" = "${old_dhcp6_name_servers}" ] ||
+               [ ! "${new_dhcp6_domain_search}" = "${old_dhcp6_domain_search}" ]; then
+                make_resolv_conf
+            fi

             if [ -z "${new_ip6_address}" ] ||
                [ -z "${new_ip6_prefixlen}" ]; then
@@ -610,10 +615,6 @@ dh6config() {
                                              preferred_lft ${new_preferred_life}
             fi

-            if [ ! "${new_dhcp6_name_servers}" = "${old_dhcp6_name_servers}" ] ||
-               [ ! "${new_dhcp6_domain_search}" = "${old_dhcp6_domain_search}" ]; then
-                make_resolv_conf
-            fi
             ;;

         DEPREF6)

Comment 3 Jiri Popelka 2014-05-26 12:05:50 UTC
Problem is:
    case "${reason}" in
        RENEW6|REBIND6)
            if [ -z "${new_ip6_address}" ] ||
               [ -z "${new_ip6_prefixlen}" ]; then
                exit_with_hooks 2
            fi

In stateless DHCPv6 the server provides only configuration information to nodes and does not perform any address assignment. [1]
It means that $new_ip6_address variable is empty/undefined in this case so the script exits before it gets to modifying resolv.conf with server provided info.

We might either apply Sohny's patch or (partly) revert [2], the previous code is what we have in RHEL-6 and Sohny confirmed that it works for him.
I did [2] because that's what upstream dhclient-script does, but it (the upstream one) obviously needs a fix too.

[1] https://tools.ietf.org/rfc/rfc3736.txt
[2] http://pkgs.fedoraproject.org/cgit/dhcp.git/commit/?h=f14&id=73600f1061442b0829bc9a359a95001f71f57c23

Comment 6 Ladislav Jozsa 2014-11-28 09:49:55 UTC
Successfully verified with dhclient-4.2.5-29.el7, /etc/resolv.conf is updated properly.

# cat /etc/resolv.conf
; generated by /usr/sbin/dhclient-script
search test.example.com. example.com.
nameserver 3ffe:501:ffff:100:200:ff:fe00:3f3e

Moving to verified.

Comment 8 errata-xmlrpc 2015-03-05 10:35:44 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://rhn.redhat.com/errata/RHBA-2015-0450.html