]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix reading prior lease without authenticaton set.
authorRoy Marples <roy@marples.name>
Fri, 7 Aug 2015 12:58:10 +0000 (12:58 +0000)
committerRoy Marples <roy@marples.name>
Fri, 7 Aug 2015 12:58:10 +0000 (12:58 +0000)
dhcp.c
dhcp6.c

diff --git a/dhcp.c b/dhcp.c
index d95baa77e89f60709bd10a116e0d0429eeac292e..2714d4129aa04fa9ca02d79c78e5cf8353f6cb56 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -1232,7 +1232,9 @@ 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) {
+       } else if ((ifp->options->auth.options & DHCPCD_AUTH_SENDREQUIRE) ==
+           DHCPCD_AUTH_SENDREQUIRE)
+       {
                logger(ifp->ctx, LOG_ERR,
                    "%s: authentication now required", ifp->name);
                free(dhcp);
diff --git a/dhcp6.c b/dhcp6.c
index cd6025961501572f0f17e7910efd8fb43a8b42ed..992b6b00fe36b06cac8b665a1d83297751b14368 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -2245,7 +2245,9 @@ auth:
                else
                        logger(ifp->ctx, LOG_DEBUG,
                            "%s: accepted reconfigure key", ifp->name);
-       } else if (ifp->options->auth.options & DHCPCD_AUTH_SENDREQUIRE) {
+       } else if ((ifp->options->auth.options & DHCPCD_AUTH_SENDREQUIRE) ==
+           DHCPCD_AUTH_SENDREQUIRE)
+       {
                logger(ifp->ctx, LOG_ERR,
                    "%s: authentication now required", ifp->name);
                goto ex;