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: | dhcp | Assignee: | Jiri Popelka <jpopelka> |
| Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | CC: | dustin, kumuda, ljozsa, praiskup, thozza |
| Target Milestone: | rc | Keywords: | 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: | |||
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)
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
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. 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 |
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