summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-04-29 17:32:53 +0100
committerRoy Marples <roy@marples.name>2019-04-29 17:32:53 +0100
commitbdeeffdc770c53f7799d772d203e48e886b98238 (patch)
treed7ef9a246aab8d56bc5523a95086a49fbd888e36
parent84d4b546f127b43de41841e2328115d3f7c3baed (diff)
downloaddhcpcd-bdeeffdc770c53f7799d772d203e48e886b98238.tar.xz
dhcp: Ensure that we have DHCP running on the receiving interface
... before trying to process the received BOOTP message on it.
-rw-r--r--src/dhcp.c5
1 files changed, 5 insertions, 0 deletions
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,