Bug 671105 - dhclient can't apply IPV6 address (from Windows Server 2008 DHCP Server) to eth0
Summary: dhclient can't apply IPV6 address (from Windows Server 2008 DHCP Server) to eth0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dhcp
Version: 14
Hardware: Unspecified
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jiri Popelka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-20 11:23 UTC by Konstantin Volkov
Modified: 2011-01-25 21:00 UTC (History)
1 user (show)

Fixed In Version: dhcp-4.2.0-18.P2.fc14
Clone Of:
Environment:
Last Closed: 2011-01-25 21:00:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Konstantin Volkov 2011-01-20 11:23:34 UTC
Description of problem:

dhclient can't apply IPV6 address (from Windows Server 2008 DHCP Server) to eth0

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

dhclient-4.2.0-16.P2.fc14

How reproducible:

100%

Steps to Reproduce:
1. Set-up Windows Server 2008 DHCP Server for IPV6
2. Run dhclient
3. See that address was successfully given, but not applied to the eth0 interface
  
Actual results:

---
[root@fc646001 ~]# /sbin/dhclient -d -6 eth0
Internet Systems Consortium DHCP Client 4.2.0-P2
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/




Bound to *:546
Listening on Socket/eth0
Sending on   Socket/eth0
PRC: Confirming active lease (INIT-REBOOT).
XMT: Forming Confirm, 0 ms elapsed.
XMT:  X-- IA_NA 51:ab:b0:09
XMT:  | X-- Confirm Address fd00::7d9b:c93e:9ae6:fc4d
XMT:  V IA_NA appended.
XMT: Confirm on eth0, interval 1050ms.
RCV: Reply message on eth0 from fd00::8.
RCV:  X-- IA_NA 51:ab:b0:09
RCV:  | X-- starts 1295471235
RCV:  | X-- t1 - renew  +345600
RCV:  | X-- t2 - rebind +552960
RCV:  | X-- [Options]
RCV:  | | X-- IAADDR fd00::7d9b:c93e:9ae6:fc4d
RCV:  | | | X-- Preferred lifetime 691200.
RCV:  | | | X-- Max lifetime 1036800.
RCV:  X-- Server ID: 00:01:00:00:4d:30:4b:92:00:1c:42:f9:1c:cc
PRC: Bound to lease 00:01:00:00:4d:30:4b:92:00:1c:42:f9:1c:cc.
Prefix BOUND6 old= new=
PRC: Renewal event scheduled in 341812 seconds, to run for 207360 seconds.
PRC: Depreference scheduled in 687412 seconds.
PRC: Expiration scheduled in 1033012 seconds.
[root@fc646001 ~]# ifconfig 
eth0      Link encap:Ethernet  HWaddr 00:18:51:AB:B0:09  
          inet6 addr: fe80::218:51ff:feab:b009/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2831 errors:0 dropped:0 overruns:0 frame:0
          TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:87631 (85.5 KiB)  TX bytes:5298 (5.1 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
---

Expected results:

Address should be applied to the eth0

Additional info:

This happened because of dhclient binary set $new_ip6_address and $new_ip6_prefixlen variables for dhclient-script, but not set the ${old_ip6_prefix} or ${new_ip6_prefix} variables, so the dh6config() function  immediately exit:

---
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
---

If i comment these if ... fi seems like all works OK.

Please fix dhclient binary or dhclient-script.

Comment 1 Jiri Popelka 2011-01-20 12:15:52 UTC
Thank you for the report,

can you only add quotation marks so the condition will look like:
    if [ -n "${old_ip6_prefix}" ] ||
       [ -n "${new_ip6_prefix}" ]; then

and try again ? thanks

Comment 2 Konstantin Volkov 2011-01-20 13:44:01 UTC
Yes, with quotes all OK. Thanx!

---
[root@fc646001 ~]# diff -u /sbin/dhclient-script.orig /sbin/dhclient-script
--- /sbin/dhclient-script.orig  2011-01-20 17:14:59.000000000 +0300
+++ /sbin/dhclient-script       2011-01-20 17:14:43.000000000 +0300
@@ -557,8 +557,8 @@
 }
 
 dh6config() {
-    if [ -n ${old_ip6_prefix} ] ||
-       [ -n ${new_ip6_prefix} ]; then
+    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
[root@fc646001 ~]# rm -f /var/lib/dhclient/dhclient*
[root@fc646001 ~]# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:18:51:AB:B0:09  
          inet6 addr: fe80::218:51ff:feab:b009/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:141 errors:0 dropped:0 overruns:0 frame:0
          TX packets:77 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:16423 (16.0 KiB)  TX bytes:8448 (8.2 KiB)

[root@fc646001 ~]# /sbin/dhclient -d -6 eth0
Internet Systems Consortium DHCP Client 4.2.0-P2
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Bound to *:546
Listening on Socket/eth0
Sending on   Socket/eth0
PRC: Soliciting for leases (INIT).
XMT: Forming Solicit, 0 ms elapsed.
XMT:  X-- IA_NA 51:ab:b0:09
XMT:  | X-- Request renew in  +3600
XMT:  | X-- Request rebind in +5400
XMT: Solicit on eth0, interval 1030ms.
RCV: Advertise message on eth0 from fd00::8.
RCV:  X-- Preference 8.
RCV:  X-- IA_NA 51:ab:b0:09
RCV:  | X-- starts 1295532936
RCV:  | X-- t1 - renew  +345600
RCV:  | X-- t2 - rebind +552960
RCV:  | X-- [Options]
RCV:  | | X-- IAADDR fd00::da2c:ad8e:f6ba:7a82
RCV:  | | | X-- Preferred lifetime 691200.
RCV:  | | | X-- Max lifetime 1036800.
RCV:  X-- Server ID: 00:01:00:00:4d:30:4b:92:00:1c:42:f9:1c:cc
RCV:  Advertisement recorded.
PRC: Selecting best advertised lease.
PRC: Considering best lease.
PRC:  X-- Initial candidate 00:01:00:00:4d:30:4b:92:00:1c:42:f9:1c:cc (s: 153, p: 8).
XMT: Forming Request, 0 ms elapsed.
XMT:  X-- IA_NA 51:ab:b0:09
XMT:  | X-- Requested renew  +3600
XMT:  | X-- Requested rebind +5400
XMT:  | | X-- IAADDR fd00::da2c:ad8e:f6ba:7a82
XMT:  | | | X-- Preferred lifetime +7200
XMT:  | | | X-- Max lifetime +7500
XMT:  V IA_NA appended.
XMT: Request on eth0, interval 1030ms.
RCV: Reply message on eth0 from fd00::8.
RCV:  X-- IA_NA 51:ab:b0:09
RCV:  | X-- starts 1295532937
RCV:  | X-- t1 - renew  +345600
RCV:  | X-- t2 - rebind +552960
RCV:  | X-- [Options]
RCV:  | | X-- IAADDR fd00::da2c:ad8e:f6ba:7a82
RCV:  | | | X-- Preferred lifetime 691200.
RCV:  | | | X-- Max lifetime 1036800.
RCV:  X-- Server ID: 00:01:00:00:4d:30:4b:92:00:1c:42:f9:1c:cc
PRC: Bound to lease 00:01:00:00:4d:30:4b:92:00:1c:42:f9:1c:cc.
PRC: Renewal event scheduled in 345598 seconds, to run for 207360 seconds.
PRC: Depreference scheduled in 691198 seconds.
PRC: Expiration scheduled in 1036798 seconds.

[root@fc646001 ~]# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:18:51:AB:B0:09  
          inet6 addr: fd00::da2c:ad8e:f6ba:7a82/64 Scope:Global
          inet6 addr: fe80::218:51ff:feab:b009/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:147 errors:0 dropped:0 overruns:0 frame:0
          TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:16996 (16.5 KiB)  TX bytes:9018 (8.8 KiB)
---

Comment 3 Fedora Update System 2011-01-20 14:34:09 UTC
dhcp-4.2.0-18.P2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/dhcp-4.2.0-18.P2.fc14

Comment 4 Fedora Update System 2011-01-20 19:56:20 UTC
dhcp-4.2.0-18.P2.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update dhcp'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/dhcp-4.2.0-18.P2.fc14

Comment 5 Fedora Update System 2011-01-25 21:00:09 UTC
dhcp-4.2.0-18.P2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


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