Bug#461079: dhcp3-client: "Invalid domain list" error on good data

2008-05-16 Thread Andrew Pollock
On Fri, May 16, 2008 at 11:33:14PM +0200, Mario 'BitKoenig' Holbe wrote:
> Hi,
> 
> I stumbled across this bug because I tried to implement domain-search
> for me and did also get the "Invalid domain list." error.
> 
> On Fri, Feb 01, 2008 at 05:23:46PM -0700, Neil Mayhew wrote:
> > 0130   07 77 30 77 79 63 6c 69 66 66 65 2e 63 61 20 63  .w0wycliffe.ca c
> > 0140   61 6c 2e 77 79 63 6c 69 66 66 65 2e 63 61 20 64  al.wycliffe.ca d
> > 0150   68 63 70 2e 63 61 6c 2e 77 79 63 6c 69 66 66 65  hcp.cal.wycliffe
> > 0160   2e 63 61 2c 04 ac 10 01 08 ff.ca,..
> 
> Neil: Looks like this data is not correctly encoded according to RFC
> 3397. Perhaps this is why this error occurs. What DHCP server are you
> running?
> 
> Andrew: For me, this is reproducible as follows:
> My DHCP client runs on Debian unstable, i.e. dhcp3-client 3.1.1-1, which
> supports the domain-search option.
> My DHCP server runs on Debian stable, i.e. dhcp3-server 3.0.4-13, which
> does not support the domain-search option. Thus, I tried to define it as
>   option domain-search code 119 = text;
> in my dhcpd.conf and subsequently added a
>   option domain-search "foo.com bar.org";
> This way I'm getting the "Invalid domain list." error on the DHCP
> client. And, of course, since dhclient3 cannot decode the domain list,
> it does also not appear in dhclient-script.debug.
> 
> RFC 3397 defines the search list to be encoded as defined in RFC 1035.
> Newer dhcp3-server define a new domain-list data-type for that. I'm not
> sure if this data-type can be emulated on older versions.
> 

It can't, which is why you're having the problem.

You can define your own option on both the non-3.1.x server, and the 3.1.x
client, and then it should work, but it won't be the correct format for
other clients (e.g. MacOS X). That said, someone[1] was adamant that they were
doing exactly that, and it did work for MacOS X. Perhaps its DHCP client is
more tolerant.

[1] https://bugs.launchpad.net/ubuntu/+source/dhcp3/+bug/98618

regards

Andrew


signature.asc
Description: Digital signature


Bug#461079: dhcp3-client: "Invalid domain list" error on good data

2008-05-16 Thread Mario 'BitKoenig' Holbe
Hi,

I stumbled across this bug because I tried to implement domain-search
for me and did also get the "Invalid domain list." error.

On Fri, Feb 01, 2008 at 05:23:46PM -0700, Neil Mayhew wrote:
> 0130   07 77 30 77 79 63 6c 69 66 66 65 2e 63 61 20 63  .w0wycliffe.ca c
> 0140   61 6c 2e 77 79 63 6c 69 66 66 65 2e 63 61 20 64  al.wycliffe.ca d
> 0150   68 63 70 2e 63 61 6c 2e 77 79 63 6c 69 66 66 65  hcp.cal.wycliffe
> 0160   2e 63 61 2c 04 ac 10 01 08 ff.ca,..

Neil: Looks like this data is not correctly encoded according to RFC
3397. Perhaps this is why this error occurs. What DHCP server are you
running?

Andrew: For me, this is reproducible as follows:
My DHCP client runs on Debian unstable, i.e. dhcp3-client 3.1.1-1, which
supports the domain-search option.
My DHCP server runs on Debian stable, i.e. dhcp3-server 3.0.4-13, which
does not support the domain-search option. Thus, I tried to define it as
option domain-search code 119 = text;
in my dhcpd.conf and subsequently added a
option domain-search "foo.com bar.org";
This way I'm getting the "Invalid domain list." error on the DHCP
client. And, of course, since dhclient3 cannot decode the domain list,
it does also not appear in dhclient-script.debug.

RFC 3397 defines the search list to be encoded as defined in RFC 1035.
Newer dhcp3-server define a new domain-list data-type for that. I'm not
sure if this data-type can be emulated on older versions.


regards
   Mario
-- 
Good, Fast, Cheap: Pick any two (you can't have all three).
-- RFC 1925, 7a


signature.asc
Description: Digital signature


Bug#461079: dhcp3-client: "Invalid domain list" error on good data

2008-02-09 Thread Andrew Pollock
On Mon, Feb 04, 2008 at 03:42:10PM -0700, Neil Mayhew wrote:
> On 2008-02-03 22:36 Andrew Pollock wrote:
> >Could you enable the /etc/dhcp3/dhclient-enter-hooks.d/debug hook (by
> >editing it and changing RUN to "yes") and checking out the
> >/tmp/dhclient-script.debug file and telling me what new_domain_search is 
> >set
> >to?
> >  
> 
> I enabled that, did ifdown and ifup, and looked in 
> /tmp/dhclient-script.debug. It shows three blocks, reason='RELEASE', 
> reason='PREINIT' and reason='BOUND'. new_domain_search does not appear 
> in any of them.
> 
> What should we try next?

Please send me your dhcp3.conf and your dhclient.conf, I'd like to try and
reproduce this problem locally.

regards

Andrew


signature.asc
Description: Digital signature


Bug#461079: dhcp3-client: "Invalid domain list" error on good data

2008-02-04 Thread Neil Mayhew

On 2008-02-03 22:36 Andrew Pollock wrote:

Could you enable the /etc/dhcp3/dhclient-enter-hooks.d/debug hook (by
editing it and changing RUN to "yes") and checking out the
/tmp/dhclient-script.debug file and telling me what new_domain_search is set
to?
  


I enabled that, did ifdown and ifup, and looked in 
/tmp/dhclient-script.debug. It shows three blocks, reason='RELEASE', 
reason='PREINIT' and reason='BOUND'. new_domain_search does not appear 
in any of them.


What should we try next?

Neil



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#461079: dhcp3-client: "Invalid domain list" error on good data

2008-02-03 Thread Andrew Pollock
On Fri, Feb 01, 2008 at 05:23:46PM -0700, Neil Mayhew wrote:
> Package: dhcp3-client
> Version: 3.1.0-2
> Followup-For: Bug #461079
> 
> 
> I don't get a segfault, but I do get errors when the client is trying to
> process the domain-search option. I've looked at the wire data with
> wireshark, and the data looks OK:
> 
>    02 01 06 00 1f 84 9b 55 00 00 00 00 00 00 00 00  ...U
> 0010   ac 10 01 fc 00 00 00 00 00 00 00 00 00 11 11 0d  
> 0020   de bb 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> 0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> 0040   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> 0050   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> 0060   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> 0070   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> 0080   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> 0090   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> 00a0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> 00b0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> 00c0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> 00d0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> 00e0   00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63  c.Sc
> 00f0   35 01 05 36 04 ac 10 01 07 33 04 00 03 f4 80 01  5..6.3..
> 0100   04 ff ff ff 00 1c 04 ac 10 01 ff 03 04 ac 10 01  
> 0110   01 0f 14 64 68 63 70 2e 63 61 6c 2e 77 79 63 6c  ...dhcp.cal.wycl
> 0120   69 66 66 65 2e 63 61 06 08 ac 10 00 0f ac 10 01  iffe.ca.
> 0130   07 77 30 77 79 63 6c 69 66 66 65 2e 63 61 20 63  .w0wycliffe.ca c
> 0140   61 6c 2e 77 79 63 6c 69 66 66 65 2e 63 61 20 64  al.wycliffe.ca d
> 0150   68 63 70 2e 63 61 6c 2e 77 79 63 6c 69 66 66 65  hcp.cal.wycliffe
> 0160   2e 63 61 2c 04 ac 10 01 08 ff.ca,..
> 
> (According to wireshark, the domain-search hunk starts at offset 0131
> and ends before 0163.)
> 
> Maybe the reason I don't get a segfault is that the domain-search isn't
> the last hunk in the packet?
> 
> The errors I see in syslog (and on the terminal if I use ifup) are:
> 
> DHCPACK from 172.16.1.7
> Invalid domain list.
> Invalid domain list.
> 
> I searched for "Invalid domain" in the source, and found it at
> options.c:1494. This calls MRns_name_unpack, and then I saw the
> following at ns_name.c:320:
> 
> case 0:
> /* Limit checks. */
> if (dstp + n + 1 >= dstlim || srcp + n >= eom) {
> errno = EMSGSIZE;
> return (-1);
> }
> 
> Shouldn't that be > eom rather than >= eom? It's the only way I can see
> that an error would be returned.
> 
> Regardless, the client doesn't seem to like what wireshark thinks is
> perfectly good data.
> 
> Hope this helps,
> 

Could you enable the /etc/dhcp3/dhclient-enter-hooks.d/debug hook (by
editing it and changing RUN to "yes") and checking out the
/tmp/dhclient-script.debug file and telling me what new_domain_search is set
to?

regards

Andrew


signature.asc
Description: Digital signature


Bug#461079: dhcp3-client: "Invalid domain list" error on good data

2008-02-01 Thread Neil Mayhew
Package: dhcp3-client
Version: 3.1.0-2
Followup-For: Bug #461079


I don't get a segfault, but I do get errors when the client is trying to
process the domain-search option. I've looked at the wire data with
wireshark, and the data looks OK:

   02 01 06 00 1f 84 9b 55 00 00 00 00 00 00 00 00  ...U
0010   ac 10 01 fc 00 00 00 00 00 00 00 00 00 11 11 0d  
0020   de bb 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
0040   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
0050   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
0060   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
0070   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
0080   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
0090   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
00a0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
00b0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
00c0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
00d0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
00e0   00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63  c.Sc
00f0   35 01 05 36 04 ac 10 01 07 33 04 00 03 f4 80 01  5..6.3..
0100   04 ff ff ff 00 1c 04 ac 10 01 ff 03 04 ac 10 01  
0110   01 0f 14 64 68 63 70 2e 63 61 6c 2e 77 79 63 6c  ...dhcp.cal.wycl
0120   69 66 66 65 2e 63 61 06 08 ac 10 00 0f ac 10 01  iffe.ca.
0130   07 77 30 77 79 63 6c 69 66 66 65 2e 63 61 20 63  .w0wycliffe.ca c
0140   61 6c 2e 77 79 63 6c 69 66 66 65 2e 63 61 20 64  al.wycliffe.ca d
0150   68 63 70 2e 63 61 6c 2e 77 79 63 6c 69 66 66 65  hcp.cal.wycliffe
0160   2e 63 61 2c 04 ac 10 01 08 ff.ca,..

(According to wireshark, the domain-search hunk starts at offset 0131
and ends before 0163.)

Maybe the reason I don't get a segfault is that the domain-search isn't
the last hunk in the packet?

The errors I see in syslog (and on the terminal if I use ifup) are:

DHCPACK from 172.16.1.7
Invalid domain list.
Invalid domain list.

I searched for "Invalid domain" in the source, and found it at
options.c:1494. This calls MRns_name_unpack, and then I saw the
following at ns_name.c:320:

case 0:
/* Limit checks. */
if (dstp + n + 1 >= dstlim || srcp + n >= eom) {
errno = EMSGSIZE;
return (-1);
}

Shouldn't that be > eom rather than >= eom? It's the only way I can see
that an error would be returned.

Regardless, the client doesn't seem to like what wireshark thinks is
perfectly good data.

Hope this helps,

Neil Mayhew

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-3-vserver-686 (SMP w/2 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dhcp3-client depends on:
ii  debconf [debconf-2.0] 1.5.18 Debian configuration management sy
ii  debianutils   2.28.2 Miscellaneous utilities specific t
ii  dhcp3-common  3.1.0-2common files used by all the dhcp3
ii  libc6 2.7-6  GNU C Library: Shared libraries

dhcp3-client recommends no packages.

-- debconf information:
  dhcp3-client/dhclient-needs-restarting:
  dhcp3-client/dhclient-script_moved:



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]