[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#690889: udhcpc always returns a domain of "bad" when receiving a valid dhcp ack packet



Package: udhcpc
Version: :1.20.0-7
Severity: normal
Tags: d-i

udhcpc always returns a domain of "bad" when receiving a valid dhcp ack
from an upstream dhcp server. To reproduce first create a shellscript to
dump all of the variables set by udhcpc uppon successful receipt of a lease:

echo '#!/bin/sh' > /tmp/export.sh
echo 'export' >> /tmp/export.sh
chmod +x /tmp/export.sh

Then call udhcpc with flags set to call the script:

/sbin/udhcpc -s /tmp/export.sh

In my environment with a known good/working isc-dhcpd config, the output is:

 /tmp/udhcpc -s /tmp/sh.sh
udhcpc (v1.20.2) started
export BOOT_IMAGE='debian-installer/amd64/linux.wheezy'
export HOME='/'
export LANG='C'
export LANGUAGE='en'
export MENU='/usr/bin/main-menu'
export PATH='/sbin:/usr/sbin:/bin:/usr/bin'
export PWD='/'
export SHELL='/bin/sh'
export SHLVL='1'
export TERM='vt102'
export TERM_TYPE='serial'
export USER='root'
export _='/tmp/udhcpc'
export initrd='debian-installer/amd64/initrd-wheezy-isc.gz'
export interface='eth0'
Sending discover...
Sending select for 10.30.109.62...
Lease of 10.30.109.62 obtained, lease time 600
export BOOT_IMAGE='debian-installer/amd64/linux.wheezy'
export HOME='/'
export LANG='C'
export LANGUAGE='en'
export MENU='/usr/bin/main-menu'
export PATH='/sbin:/usr/sbin:/bin:/usr/bin'
export PWD='/'
export SHELL='/bin/sh'
export SHLVL='1'
export TERM='vt102'
export TERM_TYPE='serial'
export USER='root'
export _='/tmp/udhcpc'
export boot_file='pxelinux.0'
export broadcast='10.30.109.255'
export dns='10.10.80.10 10.10.80.11'
export domain='bad'
export hostname='systest-2'
export initrd='debian-installer/amd64/initrd-wheezy-isc.gz'
export interface='eth0'
export ip='10.30.109.62'
export lease='600'
export mask='24'
export opt53='05'
export router='10.30.109.254'
export serverid='10.30.10.20'
export siaddr='10.30.10.20'
export subnet='255.255.255.0'

I've tcpdumped both the client and server side of the dhcp exchange and
wireshark decodes the full ack packet as a valid dhcp/bootp ack AND includes
the correct domainname as configured to be sent on the server.

Testing with isc-dhcp-client also yields a successful lease with the correct
domain name set.

The major problem with this bug is that when using debian installer the
network config generated is always invalid. The domain-name cannot be set
in preseed either since the d-i logic in netcfg always give precedence to
values received from dhcp.

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash


Reply to: