From: Roy Marples Date: Fri, 24 Jul 2015 21:51:02 +0000 (+0000) Subject: Only read the DHCP lease when doing DHCP. X-Git-Tag: v6.9.2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a2d8aac7e39b0f6c5a3ab834670ac95ee1a9a77;p=thirdparty%2Fdhcpcd.git Only read the DHCP lease when doing DHCP. --- diff --git a/dhcp.c b/dhcp.c index a413956a..fbc5778e 100644 --- a/dhcp.c +++ b/dhcp.c @@ -3200,7 +3200,7 @@ dhcp_start1(void *arg) } /* We don't want to read the old lease if we NAK an old test */ nolease = state->offer && ifp->ctx->options & DHCPCD_TEST; - if (!nolease) { + if (!nolease && ifo->options & DHCPCD_DHCP) { state->offer = read_lease(ifp); /* Check the saved lease matches the type we want */ if (state->offer) {