"semicolon expected" parsing errors on "cltt" in dhcpd.leases

Bug #824024 reported by Loïc Minier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
isc-dhcp (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Hey

This is about bogus parsing of the leases file by dhcpd.

I don't know whether this is BOOTP specific or not, but I've setup isc-dhcp-server (dhcpd) to accept bootp clients with this config:
subnet 172.16.0.0 netmask 255.240.0.0 {
  range dynamic-bootp 172.17.0.0 172.17.255.255;
  option domain-name-servers google-public-dns-a.google.com, google-public-dns-b.google.com;
  option routers 172.16.0.254;
  option broadcast-address 172.31.255.255;
  default-lease-time 600;
  max-lease-time 7200;
  filename "xyz";
}

eth1 is setup as follows in /etc/network/interfaces:
iface eth1 inet static
    address 172.16.0.254
    netmask 255.240.0.0

The BOOTP client is connected with a direct ethernet cable from an USB ethernet adapter on my laptop to its first network interface and is running RedBoot as a bootloader (it's an ARM box).

When dhcpd starts the first time, it looks something like this:
Aug 10 17:25:06 localhost dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
Aug 10 17:25:06 localhost dhcpd: Copyright 2004-2010 Internet Systems Consortium.
Aug 10 17:25:06 localhost dhcpd: All rights reserved.
Aug 10 17:25:06 localhost dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Aug 10 17:25:06 localhost dhcpd: Wrote 0 leases to leases file.

then eventually the BOOTP request comes in when the device boots:
Aug 10 17:25:29 localhost NetworkManager[1190]: <info> (eth1): carrier now ON (device state 10)
Aug 10 17:25:29 localhost kernel: [21893.809257] asix 2-1.4:1.0: eth1: link up, 100Mbps, full-duplex, lpa 0xC1E1
Aug 10 17:25:30 localhost dhcpd: BOOTREQUEST from 00:14:fd:10:38:9a via eth1
Aug 10 17:25:30 localhost dhcpd: BOOTREPLY on 172.17.0.0 to 00:14:fd:10:38:9a via eth1

I run a network trace in parallel that shows that *two* BOOTP requests come in with one second of interval, looking pretty much identical. The second one is immediately answered with a lease.

Poking /var/lib/dhcp/dhcpd.leases at this point shows *two* entries for 172.17.0.0 looking something like:
lease 172.17.0.0 {
  starts 3 2011/08/10 15:25:30;
  ends never;
  cltt 3 2011/08/10 15:25:30;
  binding state free;
  hardware ethernet 00:14:fd:10:38:9a;
}

this is listed twice with same IP and MAC address.

If I then restart dhcpd, I get:
Aug 10 17:31:30 localhost dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
Aug 10 17:31:30 localhost dhcpd: Copyright 2004-2010 Internet Systems Consortium.
Aug 10 17:31:30 localhost dhcpd: All rights reserved.
Aug 10 17:31:30 localhost dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Aug 10 17:31:30 localhost dhcpd: /var/lib/dhcp/dhcpd.leases line 9: semicolon expected.
Aug 10 17:31:30 localhost dhcpd: cltt
Aug 10 17:31:30 localhost dhcpd: ^
Aug 10 17:31:30 localhost dhcpd: /var/lib/dhcp/dhcpd.leases line 17: semicolon expected.
Aug 10 17:31:30 localhost dhcpd: cltt
Aug 10 17:31:30 localhost dhcpd: ^
Aug 10 17:31:30 localhost dhcpd: Wrote 1 leases to leases file.

and the lease file now has only one entry like:
lease 172.17.0.0 {
  starts 3 2011/08/10 15:25:30;
  binding state free;
  hardware ethernet 00:14:fd:10:38:9a;
}

There are two things wrong here:
* two entries in the lease file, not sure why
* can't parse its own leases on restart ("end" and "cltt" params)

Cheers,

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: isc-dhcp-server 4.1.1-P1-17ubuntu5
Uname: Linux 3.0.0-0300rc1-generic x86_64
Architecture: amd64
Date: Wed Aug 10 17:32:19 2011
ProcEnviron:
 LANGUAGE=fr_FR:fr:en_GB:en
 PATH=(custom, user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/zsh
SourcePackage: isc-dhcp
UpgradeStatus: Upgraded to oneiric on 2009-12-07 (611 days ago)
mtime.conffile..etc.dhcp.dhcpd.conf: 2011-08-10T17:23:15.277158

Revision history for this message
Loïc Minier (lool) wrote :
Revision history for this message
Stéphane Graber (stgraber) wrote :

Could you try with 12.04? We've since upgraded to the long term support release of isc-dhcp that brought a lot of bugfixes though sadly not in a way that lets me easily check whether this one was fixed...

Changed in isc-dhcp (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for isc-dhcp (Ubuntu) because there has been no activity for 60 days.]

Changed in isc-dhcp (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.