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
commit640ac214194d32a0696d1a64569ea82365a7af0c (patch)
treed7ef9a246aab8d56bc5523a95086a49fbd888e36
parent330f1dd0bcb64f5a6138c18e3df38c34b2fb50f5 (diff)
downloaddhcpcd-640ac214194d32a0696d1a64569ea82365a7af0c.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,