summaryrefslogtreecommitdiffhomepage
path: root/src/dhcpv4.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2014-06-16 18:25:56 +0200
committerSteven Barth <steven@midlink.org>2014-06-16 18:25:56 +0200
commitb40f7fa3f3b48b574f513df1105d700c070aa335 (patch)
tree6e8e477bc35227e1ba9d3860597921f3ae6cde09 /src/dhcpv4.c
parent69ca34df0145dd204dceeacc7caf978e4055d679 (diff)
add more consistency to host file writing
Diffstat (limited to 'src/dhcpv4.c')
-rw-r--r--src/dhcpv4.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dhcpv4.c b/src/dhcpv4.c
index b5eeb6e..62ddab8 100644
--- a/src/dhcpv4.c
+++ b/src/dhcpv4.c
@@ -517,10 +517,11 @@ static struct dhcpv4_assignment* dhcpv4_lease(struct interface *iface,
} else if (!assigned && a) { // Cleanup failed assignment
free(a);
a = NULL;
- } else {
- update_state = true;
}
+ if (a)
+ update_state = true;
+
if (assigned && a)
lease = a;
} else if (msg == DHCPV4_MSG_RELEASE) {