From: Roy Marples Date: Fri, 7 Aug 2015 12:58:10 +0000 (+0000) Subject: Fix reading prior lease without authenticaton set. X-Git-Tag: v6.9.2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=642ebb39081775606223b53a9705119d4fb75fd3;p=thirdparty%2Fdhcpcd.git Fix reading prior lease without authenticaton set. --- diff --git a/dhcp.c b/dhcp.c index d95baa77..2714d412 100644 --- 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 cd602596..992b6b00 100644 --- 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;