projects
/
project
/
odhcpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
710744e
)
odhcpd: don't kill static lease entries
author
Steven Barth
<steven@midlink.org>
Sat, 23 Aug 2014 12:32:00 +0000
(14:32 +0200)
committer
Steven Barth
<steven@midlink.org>
Sat, 23 Aug 2014 12:32:00 +0000
(14:32 +0200)
src/dhcpv4.c
patch
|
blob
|
history
diff --git
a/src/dhcpv4.c
b/src/dhcpv4.c
index 89750b23cbc3f73d77deed1b2ec35a2c5994beb8..fdf5f685189346fa99b703f7336a642a6fa29744 100644
(file)
--- a/
src/dhcpv4.c
+++ b/
src/dhcpv4.c
@@
-611,10
+611,9
@@
static struct dhcpv4_assignment* dhcpv4_lease(struct interface *iface,
if (assigned && a)
lease = a;
} else if (msg == DHCPV4_MSG_RELEASE) {
- if (a
) {
+ if (a
&& a->valid_until != LONG_MAX)
a->valid_until = 0;
- }
- } else if (msg == DHCPV4_MSG_DECLINE) {
+ } else if (msg == DHCPV4_MSG_DECLINE && a->valid_until != LONG_MAX) {
memset(a->hwaddr, 0, sizeof(a->hwaddr));
a->valid_until = now + 3600; // Block address for 1h
}