This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Bug 1000046, BSD TCPIP asserts with "unregistered netisr handler" for ARP packets
- From: "Philip Keller" <keller at metrolab dot ch>
- To: <ecos-patches at ecos dot sourceware dot org>
- Date: Wed, 19 Jul 2006 14:48:41 +0200
- Subject: Bug 1000046, BSD TCPIP asserts with "unregistered netisr handler" for ARP packets
I propose the following patch to fix bug 1000046, "BSD TCPIP asserts with
'unregistered netisr handler' for ARP packets." It simply does what Gary
Thomas suggested two years ago:
* src/ecos/support.c: In cyg_netint, don't handle events that don't have
handlers registered. Fixes Bug 1000046, whereby an assertion or crash
resulted from an ARP package arriving before network initialization was
complete.
-- Philip Keller
diff --context --ignore-all-space --recursive
cvs_08_02_06/ecos-2.0.x/packages/net/bsd_tcpip/current/src/ecos/support.c
ecos-2.0.x/packages/net/bsd_tcpip/current/src/ecos/support.c
***
cvs_08_02_06/ecos-2.0.x/packages/net/bsd_tcpip/current/src/ecos/support.c
Wed Feb 8 11:04:58 2006
--- ecos-2.0.x/packages/net/bsd_tcpip/current/src/ecos/support.c Wed
Jul 19 14:27:29 2006
***************
*** 729,735 ****
spl = splsoftnet(); // Prevent any overlapping "stack" processing
for (lvl = NETISR_MIN; lvl <= NETISR_MAX; lvl++) {
if (curisr & (1<<lvl)) {
! CYG_ASSERT(_netisr_handlers[lvl] != 0, "unregistered
netisr handler");
(*_netisr_handlers[lvl])();
}
}
--- 729,735 ----
spl = splsoftnet(); // Prevent any overlapping "stack" processing
for (lvl = NETISR_MIN; lvl <= NETISR_MAX; lvl++) {
if (curisr & (1<<lvl)) {
! if (_netisr_handlers[lvl] != 0)
(*_netisr_handlers[lvl])();
}
}