From: Roy Marples Date: Mon, 29 Apr 2019 16:32:53 +0000 (+0100) Subject: dhcp: Ensure that we have DHCP running on the receiving interface X-Git-Tag: v7.2.2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=640ac214194d32a0696d1a64569ea82365a7af0c;p=thirdparty%2Fdhcpcd.git dhcp: Ensure that we have DHCP running on the receiving interface ... before trying to process the received BOOTP message on it. --- diff --git a/src/dhcp.c b/src/dhcp.c index f24d14f6..8291dd23 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -3499,6 +3499,11 @@ dhcp_readudp(struct dhcpcd_ctx *ctx, struct interface *ifp) logerr(__func__); return; } + if (D_CSTATE(ifp) == NULL) { + logdebugx("%s: received BOOTP for inactive interface", + ifp->name); + return; + } } dhcp_handlebootp(ifp, (struct bootp *)buf, (size_t)bytes,