Bug 830040

Summary: dhclient6 errors when using -P -N
Product: [Fedora] Fedora Reporter: H. Peter Anvin <hpa>
Component: dhcpAssignee: Jiri Popelka <jpopelka>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: extras-orphan, h.peter.anvin, jpopelka
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-08 11:11:13 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 H. Peter Anvin 2012-06-08 03:42:37 UTC
Description of problem:

When using dhclient6 with the -P -N options (meaning: get an upstream address via IA_NA, -N, as well as delegate a prefix via IA_PD, -P) the upstream address fails to configure.

This appears to be because of two independent problems:

a. /sbin/dhclient-script assumes that the presence of either old_ip6_prefix or new_ip6_prefix means nothing needs to be done:

dh6config() {
    if [ -n "${old_ip6_prefix}" ] ||
       [ -n "${new_ip6_prefix}" ]; then
        echo Prefix ${reason} old=${old_ip6_prefix} new=${new_ip6_prefix}
        exit_with_hooks 0
    fi


b. When receiving a REBIND6 event, new_ip6_address and new_ip6_prefixlen are not sent from the core program to the script, which means that if a lease already exists, the interface is not configured.

Version-Release number of selected component (if applicable):
dhclient-4.2.3-8.P2.fc16.i686

How reproducible:
Every time

Steps to Reproduce:
1. Use dhclient6 -P -N on a network which supports both IA_NA and IA_PD.
2. Observe that the actual upstream address is never configured.

Comment 1 H. Peter Anvin 2012-06-08 03:45:18 UTC
Specifically, in /etc/sysconfig/network-script/ifcfg-<if>:

IPV6INIT=yes
DHCPV6C=yes
DHCPV6C_OPTIONS='-P -N -cf /etc/dhcp/dhclient6.conf'

Comment 2 Jiri Popelka 2012-06-08 11:11:13 UTC
Hi,
thanks for the report.

The 'IP assignment' and 'prefix delegation' mechanisms serve different purposes and I'm sure they can't be safely used together.

See dhclient(8):

OPTIONS
  -6 ... The -S -T -P -N and -D arguments provide more control over aspects of the DHCPv6 processing.  Note: it is not recommended to *mix* queries of different types *together* or even to share the lease file between them.

  -P ... This implies -6 and also *disables* the normal address query.  See -N to restore it.

  -N ... It is used to restore normal operation *after* using -T or -P.

Comment 3 H. Peter Anvin, Intel 2012-06-08 16:18:47 UTC
Fair enough.  That means that the bug is actually in initscripts/NetworkManager, because currently there is only support for a single dhclient run on a specific interface, and what you are saying is that each query type should run a separate instance.

For the record, this is not something required by the protocol, and as such it is still a shortcoming in dhclient (I have also filed a bug report with ISC on this.)  The ISP expectation seems to be that these should come in under a single DUID although with separate IAIDs.