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:
Seigo Tanimura 2000-12-31 01:31:55 +00:00
parent e9df486f0a
commit 338c0bc664
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70531

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);
}
}