mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
arp: fix race between init and incoming packets
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user