Bug 15157

Summary: dhcp for ipv6 fails
Product: Mageia Reporter: james Whitby <jim>
Component: RPM PackagesAssignee: Colin Guthrie <mageia>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: pterjan
Version: CauldronKeywords: Triaged
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard: MGA5TOO MGA7TOO
Source RPM: initscripts CVE:
Status comment:

Description james Whitby 2015-01-29 20:12:56 CET
Description of problem:

Add DHCPV6C=yes to ifcfg-[net card].
restart network ( or reboot )
dhcp fails with command line error.

This error *appears* to be in ifup-eth.
Near the end of script is the line to run dhclient -6 to obtain the ipv6 address,'

This line contains an option to dhclient that doesn't exist (-H).
Complete line is:

/sbin/dhclient -6 -1 ${DHCPV6C_OPTIONS} ${DHCLIENTCONF} -lf ${LEASEFILE} -pf /var/run/dhclient6-${DEVICE}.pid -H ${DHCP_HOSTNAME:-${HOSTNAME%%.*}} ${DEVICE}

Changing this line to be:

/sbin/dhclient -6 -1 ${DHCPV6C_OPTIONS} ${DHCLIENTCONF} -lf ${LEASEFILE} -pf /var/run/dhclient6-${DEVICE}.pid ${DEVICE}

Does get an ipv6 address from dhcp server ( dhcp server is on seperate machine (router) ).



Reproducible: 

Steps to Reproduce:
David Walser 2015-01-30 22:36:42 CET

CC: sysadmin-bugs => (none)
Source RPM: (none) => initscripts
Assignee: bugsquad => mageia
Component: Release (media or process) => RPM Packages

Samuel Verschelde 2015-05-31 22:33:57 CEST

Whiteboard: (none) => MGA5TOO
Keywords: (none) => Triaged

Comment 1 Pascal Terjan 2020-01-02 14:55:07 CET
I encountered the same problem, removing the line "set_hostname_options DHCLIENTARGS" fixed it.

I then got another error:

Can't bind to dhcp address: Cannot assign requested address
Please make sure there is no other dhcp server
running and that there's no entry for dhcp or
bootp in /etc/inetd.conf. Also make sure you
are not running HP JetAdmin software, which
includes a bootp server.

Problem is described at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=705996

I added the following code inspired by the Debian one:

    # We need to wait for duplicate address detection to complete before running dhclient -6
    for i in $(seq 5); do
        lladdress=$(ip -6 -o a s dev "$DEVICE" scope link -tentative)
        if [ -n "$lladdress" ]; then
            break
        fi
        sleep 1
    done

And I now get an IPv6

CC: (none) => pterjan

Pascal Terjan 2020-01-02 14:55:32 CET

Whiteboard: MGA5TOO => MGA5TOO MGA7TOO

Comment 2 Pascal Terjan 2020-05-17 21:15:15 CEST
This was fixed in Cauldron last week (http://svnweb.mageia.org/packages/cauldron/initscripts/current/SOURCES/initscripts-9.78-DHCPv6.patch?revision=1583354&view=markup&pathrev=1583354), but we should probably also fix it in 7.
Comment 3 james Whitby 2020-05-27 07:56:35 CEST
Has this been fixed and should be closed?
Comment 4 Pascal Terjan 2022-03-10 14:58:44 CET
Closing as this works in 8 and Cauldron

Status: NEW => RESOLVED
Resolution: (none) => FIXED