svn commit: r185707 - head/sys/dev/ae
Stanislav Sedov
stas at FreeBSD.org
Sat Dec 6 06:23:45 PST 2008
Author: stas
Date: Sat Dec 6 14:23:45 2008
New Revision: 185707
URL: http://svn.freebsd.org/changeset/base/185707
Log:
- Eliminate unused variable. [1]
- Check for runt frames entering the stack. [2]
Suggested by: ganbold[1], yongari[2]
Approved by: kib (mentor)
MFC after: 2 weeks
Modified:
head/sys/dev/ae/if_ae.c
Modified: head/sys/dev/ae/if_ae.c
==============================================================================
--- head/sys/dev/ae/if_ae.c Sat Dec 6 14:20:04 2008 (r185706)
+++ head/sys/dev/ae/if_ae.c Sat Dec 6 14:23:45 2008 (r185707)
@@ -1105,12 +1105,9 @@ ae_dmamap_cb(void *arg, bus_dma_segment_
static int
ae_alloc_rings(ae_softc_t *sc)
{
- bus_dma_tag_t bustag;
bus_addr_t busaddr;
int error;
- bustag = bus_get_dma_tag(sc->dev);
-
/*
* Create parent DMA tag.
*/
@@ -1903,8 +1900,8 @@ ae_rxeof(ae_softc_t *sc, ae_rxd_t *rxd)
if_printf(ifp, "Rx interrupt occuried.\n");
#endif
size = le16toh(rxd->len) - ETHER_CRC_LEN;
- if (size < 0) {
- if_printf(ifp, "Negative length packet received.");
+ if (size < (ETHER_MIN_LEN - ETHER_CRC_LEN - ETHER_VLAN_ENCAP_LEN)) {
+ if_printf(ifp, "Runt frame received.");
return (EIO);
}
More information about the svn-src-all
mailing list