Project

General

Profile

Actions

Bug #5648

closed

DHCP lease reading is done in the wrong order

Added by Greg Sutcliffe about 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
DHCP
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

DHCP uses a last-lease-wins system - new leases are appended to the leases file and automatically are preferred over earlier entries. However, the proxy uses a first-lease-wins, where we discard any leases that we already have in memory when parsing the leases file.

When you have a lease file like this:

lease 192.168.123.58 {
starts 5 2014/05/09 14:38:13;
ends 5 2014/05/09 14:48:13;
cltt 5 2014/05/09 14:38:13;
binding state active;
next binding state free;
rewind binding state free;
hardware ethernet 52:54:00:22:17:2b;
uid "\001RT\000\"\027+";
}
lease 192.168.123.59 {
starts 5 2014/05/09 14:39:00;
ends 5 2014/05/09 14:49:00;
cltt 5 2014/05/09 14:39:00;
binding state active;
next binding state free;
rewind binding state free;
hardware ethernet 52:54:00:22:17:2b;
}
lease 192.168.123.59 {
starts 5 2014/05/09 14:39:12;
ends 5 2014/05/09 14:49:12;
cltt 5 2014/05/09 14:39:12;
binding state active;
next binding state free;
rewind binding state free;
hardware ethernet 52:54:00:22:17:2b;
}

Then the proxy would report that /dhcp/192.168.123.0/52:54:00:22:17:2b has IP 192.168.123.58 - when in actual fact it has 192.168.123.59.

We need to rewire the proxy to replace leases in memory as it parses down the file.


Related issues 2 (0 open2 closed)

Related to Foreman - Bug #5637: DHCP conflicts triggered for non-conflicting leasesClosedGreg Sutcliffe05/08/2014Actions
Related to Smart Proxy - Bug #5739: Host deletion finds irrelevant old leasesClosedGreg Sutcliffe05/15/2014Actions
Actions

Also available in: Atom PDF