mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +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
|
// executed in dpc context
|
||||||
void arp_process(netdev_t *netdev, void *buffer) {
|
void arp_process(netdev_t *netdev, void *buffer) {
|
||||||
|
// not initialized yet
|
||||||
|
if (handlerthread == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
arpframe_t *frame = buffer;
|
arpframe_t *frame = buffer;
|
||||||
if (frame->hwtype != cpu_to_be_w(1)) // ethernet
|
if (frame->hwtype != cpu_to_be_w(1)) // ethernet
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user