]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Add an assert here as it's currently failing when moving a lease from one interface...
authorRoy Marples <roy@marples.name>
Sun, 13 Sep 2015 09:32:20 +0000 (09:32 +0000)
committerRoy Marples <roy@marples.name>
Sun, 13 Sep 2015 09:32:20 +0000 (09:32 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index c4451f92ea032eae83157537619d3a4ac2c1e755..3467a68e3681ac9d31ea0916e2c9468db8563074 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -40,6 +40,7 @@
 #include <netinet/udp.h>
 #undef __FAVOR_BSD
 
+#include <assert.h>
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
@@ -1391,6 +1392,8 @@ get_lease(struct dhcpcd_ctx *ctx,
     struct dhcp_lease *lease, const struct dhcp_message *dhcp)
 {
 
+       assert(dhcp != NULL);
+
        lease->cookie = dhcp->cookie;
        /* BOOTP does not set yiaddr for replies when ciaddr is set. */
        if (dhcp->yiaddr)