]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Add a comment to prior incase I do something dumb like removing it
authorRoy Marples <roy@marples.name>
Tue, 29 Sep 2020 07:00:24 +0000 (08:00 +0100)
committerRoy Marples <roy@marples.name>
Tue, 29 Sep 2020 07:00:24 +0000 (08:00 +0100)
in the future if I forgot why it was there.

src/dhcp.c

index 923c5af5cc3a342f8c50001200b097a7c68c2ae1..623b21bc0d01f881f2587a583c068c51cd35bfc7 100644 (file)
@@ -3477,6 +3477,13 @@ dhcp_packet(struct interface *ifp, uint8_t *data, size_t len,
 #ifdef PRIVSEP
        const struct dhcp_state *state = D_CSTATE(ifp);
 
+       /* It's possible that an interface departs and arrives in short
+        * order to receive a BPF frame out of order.
+        * There is a similar check in ARP, but much lower down the stack.
+        * It's not needed for other inet protocols because we send the
+        * message as a whole and select the interface off that and then
+        * check state. BPF on the other hand is very interface
+        * specific and we do need this check. */
        if (state == NULL)
                return;