bostic@OKEEFFE.BERKELEY.EDU (Keith Bostic) (03/23/87)
4.3BSD network bug (#8, exrecv)
Index: sys/vaxif/if_ex.c 4.3BSD FIX
Description:
The ex driver must protect its enqueueing of data from ethernet boards
that interrupt at a higher priority.
Fix:
*** if_ex.c.7.1 Wed Mar 4 23:34:11 1987
--- if_ex.c.7.2 Mon Oct 13 16:57:19 1986
***************
*** 5,7 ****
*
! * @(#)if_ex.c 7.1 (Berkeley) 6/5/86
*/
--- 5,7 ----
*
! * @(#)if_ex.c 7.2 (Berkeley) 10/13/86
*/
***************
*** 29,30 ****
--- 29,31 ----
#include "ioctl.h"
+ #include "syslog.h"
#include "errno.h"
***************
*** 492,494 ****
xs->xs_if.if_oerrors++;
! printf("ex%d: transmit error=%b\n",
unit, bp->mb_rply, XMIT_BITS);
--- 493,495 ----
xs->xs_if.if_oerrors++;
! log(LOG_ERR, "ex%d: transmit error=%b\n",
unit, bp->mb_rply, XMIT_BITS);
***************
*** 557,558 ****
--- 558,560 ----
register struct ifqueue *inq;
+ int s;
***************
*** 562,564 ****
xs->xs_if.if_ierrors++;
! printf("ex%d: receive error=%b\n",
unit, bp->mb_rply, RECV_BITS);
--- 564,566 ----
xs->xs_if.if_ierrors++;
! log(LOG_ERR, "ex%d: receive error=%b\n",
unit, bp->mb_rply, RECV_BITS);
***************
*** 631,632 ****
--- 633,635 ----
+ s = splimp();
if (IF_QFULL(inq)) {
***************
*** 634,638 ****
m_freem(m);
! return;
! }
! IF_ENQUEUE(inq, m);
}
--- 637,641 ----
m_freem(m);
! } else
! IF_ENQUEUE(inq, m);
! splx(s);
}
***************
*** 914,916 ****
#ifdef DEBUG
! printf("ex%d: reset addr %s\n", ui->ui_unit,
ether_sprintf(bp->mb_na.na_addrs));
--- 917,919 ----
#ifdef DEBUG
! log(LOG_DEBUG, "ex%d: reset addr %s\n", ui->ui_unit,
ether_sprintf(bp->mb_na.na_addrs));