]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
dhcp: Ensure that we have DHCP running on the receiving interface
authorRoy Marples <roy@marples.name>
Mon, 29 Apr 2019 16:32:53 +0000 (17:32 +0100)
committerRoy Marples <roy@marples.name>
Mon, 29 Apr 2019 16:32:53 +0000 (17:32 +0100)
... before trying to process the received BOOTP message on it.

src/dhcp.c

index f24d14f603bd15f3e482b4973a4951e130ae097d..8291dd23101aac76382f3b75adb5f67494b30fb9 100644 (file)
@@ -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,