]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
If we add authentication, ensure saved lease has it.
authorRoy Marples <roy@marples.name>
Thu, 6 Aug 2015 12:52:56 +0000 (12:52 +0000)
committerRoy Marples <roy@marples.name>
Thu, 6 Aug 2015 12:52:56 +0000 (12:52 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index e7b4b4eb4b18e40d78c2b178838d969c4dddfb44..28b15492b7ea9b1a09a3167d2d4080dcd2fb9410 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -1232,6 +1232,11 @@ read_lease(struct interface *ifp)
                else
                        logger(ifp->ctx, LOG_DEBUG,
                            "%s: accepted reconfigure key", ifp->name);
+       } else if (ifp->options->auth.options & DHCPCD_AUTH_SENDREQUIRE) {
+               logger(ifp->ctx, LOG_ERR,
+                   "%s: authentication now required", ifp->name);
+               free(dhcp);
+               return NULL;
        }
 
        return dhcp;