]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r220103:
authoryongari <yongari@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 4 Apr 2011 20:40:39 +0000 (20:40 +0000)
committeryongari <yongari@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 4 Apr 2011 20:40:39 +0000 (20:40 +0000)
commitfa770ae5e6e32dd660a7f2aef2cd1f5b6ed22f81
tree7730b8b9b9a9bcf401c87eff146bfd4146d23304
parent157bc2d4d94620961c6735191e68f8268445de2e
MFC r220103:
  Normally fxp(4) does not receive bad frames but promiscuous mode
  makes controller to receive bad frames and i82557 will also receive
  bad frames since fxp(4) have to receive VLAN oversized frames. If
  fxp(4) encounter DMA overrun error, the received frame size would
  be 0 so the actual frame size after checksum field extraction the
  length would be negative(-2). Due to signed/unsigned comparison
  used in driver, frame length check did not work for DMA overrun
  frames. Correct this by casting it to int.
  While I'm here explicitly check DMA overrun error and discard the
  frame regardless of result of received frame length check.

  Reported by: n_hibma
  Tested by: n_hibma

git-svn-id: svn://svn.freebsd.org/base/stable/8@220342 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/fxp/if_fxp.c