Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 524780 - net-misc/dhcp: hostname resolution fails in chroot mode
Summary: net-misc/dhcp: hostname resolution fails in chroot mode
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-08 20:10 UTC by Daniel.Savard
Modified: 2016-11-25 23:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel.Savard 2014-10-08 20:10:47 UTC
I am trying to implement the dhcpd daemon in chroot mode and if fails to resolve hostnames from the configuration file. It works fine with ip addresses.

My chroot directory is /chroot/dhcp, I have an etc, var, dev, proc and sys directories there.

The $CHROOT/dev, $CHROOT/sys are populated using the mount as follow:

mount --bind /dev $CHROOT/dev
mount --bind /sys $CHROOT/sys

For $CHROOT/proc:

mount -t proc none $CHROOT/proc

In $CHROOT/etc I have a localtime file and the resolv.conf file.

The content of the resolv.conf is as follow:

domain cids.ca
nameserver 127.0.0.1
nameserver 10.1.1.5

The localhost is a secondary name server and 10.1.1.5 is the primary name server.

I have a file in $CHROOT/var/lib/dhcp/dhcpd.leases owned by dhcp:dhcp which is the user and group executing the dhcpd daemon.

The content of my dhcpd.conf file is as follow:

option domain-name "cids.ca";
option domain-name-servers 10.1.1.5, 10.1.1.6;

option subnet-mask 255.255.255.0;
default-lease-time 86400;
max-lease-time 86400;

host curie {
  fixed-address curie.cids.ca;
  hardware ethernet b8:27:eb:24:da:6b; # 512 MB board
  option host-name "curie.cids.ca";
}


subnet 10.1.1.0 netmask 255.255.255.0 {
  range 10.1.1.21 10.1.1.24;
  option broadcast-address 10.1.1.254;
  option routers 10.1.1.2;
}

I am running the dhcpd daemon in foreground mode with the following command to provide debug information:

/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -d -lf /var/lib/dhcp/dhcpd.leases -user dhcp -group dhcp --no-pid -chroot /chroot/dhcp

The host requesting is curie.cids.ca and if is given an address from the dynamic pool instead of the fixed address as expected.
Comment 1 Daniel.Savard 2014-10-08 20:18:13 UTC
I compiled the dhcpd daemon with many debug flags to gain more information on what is going on and I modified a bit the common/tree.c file to test the name resolution. Obviously, it fails when trying to resolve the name using the gethostbyname() function which returns a NULL pointer, however the h_errno is 0 where it should be something > 0.

Here is the output I am getting:

chadwick dhcp # /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -d -lf /var/lib/dhcp/dhcpd.leases -user dhcp -group dhcp --no-pid -chroot /chroot/dhcpInternet Systems Consortium DHCP Server 4.2.5-P1 Gentoo-r3
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
exec: supersede option server.ddns-hostname
exec: supersede option server.ddns-domainname
exec: supersede option server.ddns-rev-domainname
exec: supersede option dhcp.domain-name
exec: supersede option dhcp.domain-name-servers
exec: supersede option dhcp.subnet-mask
exec: supersede option server.default-lease-time
exec: supersede option server.max-lease-time
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
exec: supersede option server.ddns-hostname
exec: supersede option server.ddns-domainname
exec: supersede option server.ddns-rev-domainname
exec: supersede option dhcp.domain-name
exec: supersede option dhcp.domain-name-servers
exec: supersede option dhcp.subnet-mask
exec: supersede option server.default-lease-time
exec: supersede option server.max-lease-time
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 1 leases to leases file.
Listening on LPF/eth0/b8:27:eb:98:dc:ba/10.1.1.0/24
Sending on   LPF/eth0/b8:27:eb:98:dc:ba/10.1.1.0/24
Sending on   Socket/fallback/fallback-net
exec: supersede option server.ddns-hostname
exec: supersede option server.ddns-domainname
exec: supersede option server.ddns-rev-domainname
exec: supersede option dhcp.domain-name
exec: supersede option dhcp.domain-name-servers
exec: supersede option dhcp.subnet-mask
exec: supersede option server.default-lease-time
exec: supersede option server.max-lease-time
omapi_set_value (state, 1)
 ==> invalid argument
bool: check (default) returns false
exec: evaluate: succeeded
-------> host_lookup_test()
Hostnames[0]: curie.cids.ca, gethostbyname() h_errno = 0
curie.cids.ca: Resolver Error 0 (no error)
Hostnames[1]: dirac.cids.ca, gethostbyname() h_errno = 0
dirac.cids.ca: Resolver Error 0 (no error)
Hostnames[2]: bohr.cids.ca, gethostbyname() h_errno = 0
bohr.cids.ca: Resolver Error 0 (no error)
Hostnames[3]: www.ibm.com, gethostbyname() h_errno = 0
www.ibm.com: Resolver Error 0 (no error)
Hostnames[4]: hakunamatata.cids.ca, gethostbyname() h_errno = 0
hakunamatata.cids.ca: Resolver Error 0 (no error)
<-------
time: now = 1412799145  dns = 0  diff = 1412799145
Looking up curie.cids.ca
common/tree.c: gethostbyname(): Resolver Error 0 (no error)
default h_errno condition: Resolver Error 0 (no error)
data: DNS lookup (curie.cids.ca) = NULL
trying next lease matching client id: 10.1.1.21
Found lease for client id: 10.1.1.21.
trying next lease matching hw addr: 10.1.1.21
Found lease for hardware address: 10.1.1.21.
hardware lease and uid lease are identical.
choosing uid lease.
Returning lease: 10.1.1.21.
exec: supersede option server.ddns-hostname
exec: supersede option server.ddns-domainname
exec: supersede option server.ddns-rev-domainname
exec: supersede option dhcp.domain-name
exec: supersede option dhcp.domain-name-servers
exec: supersede option dhcp.subnet-mask
exec: supersede option server.default-lease-time
exec: supersede option server.max-lease-time
exec: supersede option dhcp.broadcast-address
exec: supersede option dhcp.routers
data: const = 00:01:51:80
data: const = 00:01:51:80
packet length 336
op = 1  htype = 1  hlen = 6  hops = 0
xid = 81419bfd  secs = 0  flags = 0
ciaddr = 0.0.0.0
yiaddr = 0.0.0.0
siaddr = 0.0.0.0
giaddr = 0.0.0.0
chaddr = b8:27:eb:24:da:6b
filename = 
server_name = 
  option unknown-80 "";

  option unknown-145 1;

  option dhcp-message-type 1;

  option unknown-116 1;

  option dhcp-parameter-request-list 1,121,33,3,6,12,15,28,42,51,54,58,59,119;

  option dhcp-max-message-size 1500;

  option vendor-class-identifier "dhcpcd-6.4.3:Linux-3.12.26:armv6l:BCM2708";

  option dhcp-client-identifier ff:eb:24:da:6b:0:1:0:1:1b:94:cf:2b:b8:27:eb:70:d0:40;


000: 01 01 06 00 fd 9b 41 81  00 00 00 00 00 00 00 00   ......A......... 
010: 00 00 00 00 00 00 00 00  00 00 00 00 b8 27 eb 24   .............'.$ 
020: da 6b 00 00 00 00 00 00  00 00 00 00 00 00 00 00   .k.............. 
030: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
040: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
050: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
060: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
070: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
080: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
090: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0a0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0b0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0c0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0d0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0e0: 00 00 00 00 00 00 00 00  00 00 00 00 63 82 53 63   ............c.Sc 
0f0: 35 01 01 3d 13 ff eb 24  da 6b 00 01 00 01 1b 94   5..=...$.k...... 
100: cf 2b b8 27 eb 70 d0 40  50 00 74 01 01 39 02 05   .+.'.p.@P.t..9.. 
110: dc 3c 29 64 68 63 70 63  64 2d 36 2e 34 2e 33 3a   .<)dhcpcd-6.4.3: 
120: 4c 69 6e 75 78 2d 33 2e  31 32 2e 32 36 3a 61 72   Linux-3.12.26:ar 
130: 6d 76 36 6c 3a 42 43 4d  32 37 30 38 91 01 01 37   mv6l:BCM2708...7 
140: 0e 01 79 21 03 06 0c 0f  1c 2a 33 36 3a 3b 77 ff   ..y!.....*36:;w. 
DHCPDISCOVER from b8:27:eb:24:da:6b via eth0
Ping timeout: 1
data: const = 02
data: const = 0a:01:01:06
data: const = 00:01:51:80
data: const = ff:ff:ff:00
data: const = 0a:01:01:02
data: const = 0a:01:01:05
data: const = 0a:01:01:06
data: concat ("", "") = 0a:01:01:05:0a:01:01:06
data: const = "cids.ca"
data: const = 0a:01:01:fe
DHCPOFFER on 10.1.1.21 to b8:27:eb:24:da:6b via eth0
000: 02 01 06 00 fd 9b 41 81  00 00 00 00 00 00 00 00   ......A......... 
010: 0a 01 01 15 00 00 00 00  00 00 00 00 b8 27 eb 24   .............'.$ 
020: da 6b 00 00 00 00 00 00  00 00 00 00 00 00 00 00   .k.............. 
030: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
040: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
050: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
060: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
070: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
080: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
090: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0a0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0b0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0c0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0d0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0e0: 00 00 00 00 00 00 00 00  00 00 00 00 63 82 53 63   ............c.Sc 
0f0: 35 01 02 36 04 0a 01 01  06 33 04 00 01 51 80 01   5..6.....3...Q.. 
100: 04 ff ff ff 00 03 04 0a  01 01 02 06 08 0a 01 01   ................ 
110: 05 0a 01 01 06 0f 07 63  69 64 73 2e 63 61 1c 04   .......cids.ca.. 
120: 0a 01 01 fe ff                                     .....            
bool: check (default) returns false
exec: evaluate: succeeded
-------> host_lookup_test()
Hostnames[0]: curie.cids.ca, gethostbyname() h_errno = 0
curie.cids.ca: Resolver Error 0 (no error)
Hostnames[1]: dirac.cids.ca, gethostbyname() h_errno = 0
dirac.cids.ca: Resolver Error 0 (no error)
Hostnames[2]: bohr.cids.ca, gethostbyname() h_errno = 0
bohr.cids.ca: Resolver Error 0 (no error)
Hostnames[3]: www.ibm.com, gethostbyname() h_errno = 0
www.ibm.com: Resolver Error 0 (no error)
Hostnames[4]: hakunamatata.cids.ca, gethostbyname() h_errno = 0
hakunamatata.cids.ca: Resolver Error 0 (no error)
<-------
time: now = 1412799146  dns = 1412799205  diff = -59
easy copy: 0 (null)


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The output enclosed between arrows starting with the title host_lookup_test() is my function which is trying to resolve five hostnames and even one that does not exist at all (the last one). In all cases, the gethostbyname() function returns the same thing. For the message to be printed the returned pointer must be NULL.

You can see also the host curie.cids.ca is offered the ip address 10.1.1.21 from the pool instead of the address 10.1.1.11 which is the address from the name server for the hostname curie.cids.ca.
Comment 2 Daniel.Savard 2014-10-08 20:23:33 UTC
I must make clear the hostname resolution is working fine when I am not in chroot mode. Here is sample output when I omit the -chroot flag on the command line:

chadwick dhcp # /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -d -lf /var/lib/dhcp/dhcpd.leases -user dhcp -group dhcp --no-pid                     
Internet Systems Consortium DHCP Server 4.2.5-P1 Gentoo-r3
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
exec: supersede option server.ddns-hostname
exec: supersede option server.ddns-domainname
exec: supersede option server.ddns-rev-domainname
exec: supersede option dhcp.domain-name
exec: supersede option dhcp.domain-name-servers
exec: supersede option dhcp.subnet-mask
exec: supersede option server.default-lease-time
exec: supersede option server.max-lease-time
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
exec: supersede option server.ddns-hostname
exec: supersede option server.ddns-domainname
exec: supersede option server.ddns-rev-domainname
exec: supersede option dhcp.domain-name
exec: supersede option dhcp.domain-name-servers
exec: supersede option dhcp.subnet-mask
exec: supersede option server.default-lease-time
exec: supersede option server.max-lease-time
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 0 leases to leases file.
Listening on LPF/eth0/b8:27:eb:98:dc:ba/10.1.1.0/24
Sending on   LPF/eth0/b8:27:eb:98:dc:ba/10.1.1.0/24
Sending on   Socket/fallback/fallback-net
exec: supersede option server.ddns-hostname
exec: supersede option server.ddns-domainname
exec: supersede option server.ddns-rev-domainname
exec: supersede option dhcp.domain-name
exec: supersede option dhcp.domain-name-servers
exec: supersede option dhcp.subnet-mask
exec: supersede option server.default-lease-time
exec: supersede option server.max-lease-time
omapi_set_value (state, 1)
 ==> invalid argument
bool: check (default) returns false
exec: evaluate: succeeded
-------> host_lookup_test()
Hostnames[0]: curie.cids.ca = 

  in.cids.ca;
Hostnames[1]: dirac.cids.ca = 
in.cids.ca;
Hostnames[2]: bohr.cids.ca = 

in.cids.ca;
Hostnames[3]: www.ibm.com = 	r
Hostnames[4]: hakunamatata.cids.ca, gethostbyname() h_errno = 1
hakunamatata.cids.ca: Unknown host
<-------
time: now = 1412799631  dns = 0  diff = 1412799631
Looking up curie.cids.ca
Lookup succeeded; first address is 

  www.ibm.com.cs186.net
dns -> data: 1  h -> h_addr_list [0]: 

  www.ibm.com.cs186.net
hard copy: 4 (null)
data: DNS lookup (curie.cids.ca) = 10.1.1.11
Found host for link address: 10.1.1.11.
choosing fixed address.
Returning lease: 10.1.1.11.
exec: supersede option server.ddns-hostname
exec: supersede option server.ddns-domainname
exec: supersede option server.ddns-rev-domainname
exec: supersede option dhcp.domain-name
exec: supersede option dhcp.domain-name-servers
exec: supersede option dhcp.subnet-mask
exec: supersede option server.default-lease-time
exec: supersede option server.max-lease-time
exec: supersede option dhcp.broadcast-address
exec: supersede option dhcp.routers
exec: supersede option dhcp.host-name
data: const = 00:01:51:80
data: const = 00:01:51:80
packet length 336
op = 1  htype = 1  hlen = 6  hops = 0
xid = 34735040  secs = 58881  flags = 0
ciaddr = 0.0.0.0
yiaddr = 0.0.0.0
siaddr = 0.0.0.0
giaddr = 0.0.0.0
chaddr = b8:27:eb:24:da:6b
filename = 
server_name = 
  option unknown-80 "";

  option unknown-145 1;

  option dhcp-message-type 1;

  option unknown-116 1;

  option dhcp-parameter-request-list 1,121,33,3,6,12,15,28,42,51,54,58,59,119;

  option dhcp-max-message-size 1500;

  option vendor-class-identifier "dhcpcd-6.4.3:Linux-3.12.26:armv6l:BCM2708";

  option dhcp-client-identifier ff:eb:24:da:6b:0:1:0:1:1b:94:cf:2b:b8:27:eb:70:d0:40;


000: 01 01 06 00 40 50 73 34  01 e6 00 00 00 00 00 00   ....@Ps4........ 
010: 00 00 00 00 00 00 00 00  00 00 00 00 b8 27 eb 24   .............'.$ 
020: da 6b 00 00 00 00 00 00  00 00 00 00 00 00 00 00   .k.............. 
030: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
040: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
050: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
060: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
070: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
080: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
090: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0a0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0b0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0c0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0d0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0e0: 00 00 00 00 00 00 00 00  00 00 00 00 63 82 53 63   ............c.Sc 
0f0: 35 01 01 3d 13 ff eb 24  da 6b 00 01 00 01 1b 94   5..=...$.k...... 
100: cf 2b b8 27 eb 70 d0 40  50 00 74 01 01 39 02 05   .+.'.p.@P.t..9.. 
110: dc 3c 29 64 68 63 70 63  64 2d 36 2e 34 2e 33 3a   .<)dhcpcd-6.4.3: 
120: 4c 69 6e 75 78 2d 33 2e  31 32 2e 32 36 3a 61 72   Linux-3.12.26:ar 
130: 6d 76 36 6c 3a 42 43 4d  32 37 30 38 91 01 01 37   mv6l:BCM2708...7 
140: 0e 01 79 21 03 06 0c 0f  1c 2a 33 36 3a 3b 77 ff   ..y!.....*36:;w. 
DHCPDISCOVER from b8:27:eb:24:da:6b via eth0
data: const = 02
data: const = 0a:01:01:06
data: const = 00:01:51:80
data: const = ff:ff:ff:00
data: const = 0a:01:01:02
data: const = 0a:01:01:05
data: const = 0a:01:01:06
data: concat ("", "") = 0a:01:01:05:0a:01:01:06
data: const = "curie.cids.ca"
data: const = "cids.ca"
data: const = 0a:01:01:fe
DHCPOFFER on 10.1.1.11 to b8:27:eb:24:da:6b via eth0
000: 02 01 06 00 40 50 73 34  01 e6 00 00 00 00 00 00   ....@Ps4........ 
010: 0a 01 01 0b 00 00 00 00  00 00 00 00 b8 27 eb 24   .............'.$ 
020: da 6b 00 00 00 00 00 00  00 00 00 00 00 00 00 00   .k.............. 
030: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
040: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
050: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
060: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
070: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
080: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
090: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0a0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0b0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0c0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0d0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0e0: 00 00 00 00 00 00 00 00  00 00 00 00 63 82 53 63   ............c.Sc 
0f0: 35 01 02 36 04 0a 01 01  06 33 04 00 01 51 80 01   5..6.....3...Q.. 
100: 04 ff ff ff 00 03 04 0a  01 01 02 06 08 0a 01 01   ................ 
110: 05 0a 01 01 06 0c 0d 63  75 72 69 65 2e 63 69 64   .......curie.cid 
120: 73 2e 63 61 0f 07 63 69  64 73 2e 63 61 1c 04 0a   s.ca..cids.ca... 
130: 01 01 fe ff                                        ....             
bool: check (default) returns false
exec: evaluate: succeeded
-------> host_lookup_test()
Hostnames[0]: curie.cids.ca = 

  www.ibm.com.cs186.net
Hostnames[1]: dirac.cids.ca = 
www.ibm.com.cs186.net
Hostnames[2]: bohr.cids.ca = 

www.ibm.com.cs186.net
Hostnames[3]: www.ibm.com = 	r
Hostnames[4]: hakunamatata.cids.ca, gethostbyname() h_errno = 1
hakunamatata.cids.ca: Unknown host
<-------
time: now = 1412799631  dns = 1412803231  diff = -3600
easy copy: 4 (null)
File: tree.c, Line: 453
data: DNS lookup (curie.cids.ca) = 10.1.1.11
Found host for link address: 10.1.1.11.
choosing fixed address.
Returning lease: 10.1.1.11.
exec: supersede option server.ddns-hostname
exec: supersede option server.ddns-domainname
exec: supersede option server.ddns-rev-domainname
exec: supersede option dhcp.domain-name
exec: supersede option dhcp.domain-name-servers
exec: supersede option dhcp.subnet-mask
exec: supersede option server.default-lease-time
exec: supersede option server.max-lease-time
exec: supersede option dhcp.broadcast-address
exec: supersede option dhcp.routers
exec: supersede option dhcp.host-name
data: const = 00:01:51:80
data: const = 00:01:51:80
packet length 343
op = 1  htype = 1  hlen = 6  hops = 0
xid = 34735040  secs = 58881  flags = 0
ciaddr = 0.0.0.0
yiaddr = 0.0.0.0
siaddr = 0.0.0.0
giaddr = 0.0.0.0
chaddr = b8:27:eb:24:da:6b
filename = 
server_name = 
  option dhcp-requested-address 10.1.1.11;

  option unknown-145 1;

  option dhcp-message-type 3;

  option dhcp-server-identifier 10.1.1.6;

  option dhcp-parameter-request-list 1,121,33,3,6,12,15,28,42,51,54,58,59,119;

  option dhcp-max-message-size 1500;

  option vendor-class-identifier "dhcpcd-6.4.3:Linux-3.12.26:armv6l:BCM2708";

  option dhcp-client-identifier ff:eb:24:da:6b:0:1:0:1:1b:94:cf:2b:b8:27:eb:70:d0:40;


000: 01 01 06 00 40 50 73 34  01 e6 00 00 00 00 00 00   ....@Ps4........ 
010: 00 00 00 00 00 00 00 00  00 00 00 00 b8 27 eb 24   .............'.$ 
020: da 6b 00 00 00 00 00 00  00 00 00 00 00 00 00 00   .k.............. 
030: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
040: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
050: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
060: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
070: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
080: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
090: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0a0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0b0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0c0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0d0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0e0: 00 00 00 00 00 00 00 00  00 00 00 00 63 82 53 63   ............c.Sc 
0f0: 35 01 03 3d 13 ff eb 24  da 6b 00 01 00 01 1b 94   5..=...$.k...... 
100: cf 2b b8 27 eb 70 d0 40  32 04 0a 01 01 0b 36 04   .+.'.p.@2.....6. 
110: 0a 01 01 06 39 02 05 dc  3c 29 64 68 63 70 63 64   ....9...<)dhcpcd 
120: 2d 36 2e 34 2e 33 3a 4c  69 6e 75 78 2d 33 2e 31   -6.4.3:Linux-3.1 
130: 32 2e 32 36 3a 61 72 6d  76 36 6c 3a 42 43 4d 32   2.26:armv6l:BCM2 
140: 37 30 38 91 01 01 37 0e  01 79 21 03 06 0c 0f 1c   708...7..y!..... 
150: 2a 33 36 3a 3b 77 ff                               *36:;w.          
DHCPREQUEST for 10.1.1.11 (10.1.1.6) from b8:27:eb:24:da:6b via eth0
data: const = 05
data: const = 0a:01:01:06
data: const = 00:01:51:80
data: const = ff:ff:ff:00
data: const = 0a:01:01:02
data: const = 0a:01:01:05
data: const = 0a:01:01:06
data: concat ("", "") = 0a:01:01:05:0a:01:01:06
data: const = "curie.cids.ca"
data: const = "cids.ca"
data: const = 0a:01:01:fe
DHCPACK on 10.1.1.11 to b8:27:eb:24:da:6b via eth0
000: 02 01 06 00 40 50 73 34  01 e6 00 00 00 00 00 00   ....@Ps4........ 
010: 0a 01 01 0b 00 00 00 00  00 00 00 00 b8 27 eb 24   .............'.$ 
020: da 6b 00 00 00 00 00 00  00 00 00 00 00 00 00 00   .k.............. 
030: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
040: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
050: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
060: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
070: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
080: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
090: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0a0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0b0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0c0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0d0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................ 
0e0: 00 00 00 00 00 00 00 00  00 00 00 00 63 82 53 63   ............c.Sc 
0f0: 35 01 05 36 04 0a 01 01  06 33 04 00 01 51 80 01   5..6.....3...Q.. 
100: 04 ff ff ff 00 03 04 0a  01 01 02 06 08 0a 01 01   ................ 
110: 05 0a 01 01 06 0c 0d 63  75 72 69 65 2e 63 69 64   .......curie.cid 
120: 73 2e 63 61 0f 07 63 69  64 73 2e 63 61 1c 04 0a   s.ca..cids.ca... 
130: 01 01 fe ff                                        ....             


We can see curie.cids.ca is offered the right ip address: 10.1.1.11. And we can see the host_lookup_test() function is not generating any errors except for the last hostname which does not exist and return then an Unknown host message as expected.
Comment 3 SpanKY gentoo-dev 2014-10-17 19:34:47 UTC
try copying in also /etc/nsswitch.conf and /etc/hosts
Comment 4 Daniel.Savard 2014-10-17 20:10:39 UTC
Same error, dhcpd still fails to resolv ip addresses from its configuration file.