Ignore a net interrupt if the corresponding handler is not

registered.

This fixes panic on my laptop where a spurious arp packet
is received when arp is not ready to run.
This commit is contained in:
tanimura 2000-12-31 01:31:55 +00:00
parent 653b0a4d6a
commit 48f3847902

View File

@ -311,7 +311,10 @@ swi_net(void *dummy)
bits = atomic_readandclear_int(&netisr);
while ((i = ffs(bits)) != 0) {
i--;
netisrs[i]();
if (netisrs[i] != NULL)
netisrs[i]();
else
printf("swi_net: unregistered isr number: %d.\n", i);
bits &= ~(1 << i);
}
}