arp: fix race between init and incoming packets

This commit is contained in:
Matheus
2025-08-12 23:43:06 -03:00
parent 98be724c65
commit 5b5dca8137
+4
View File
@@ -179,6 +179,10 @@ static void handlerthreadfn() {
// executed in dpc context
void arp_process(netdev_t *netdev, void *buffer) {
// not initialized yet
if (handlerthread == NULL)
return;
arpframe_t *frame = buffer;
if (frame->hwtype != cpu_to_be_w(1)) // ethernet
return;