Author: stas Date: Sun Jan 18 11:17:46 2009 New Revision: 187383 URL: http://svn.freebsd.org/changeset/base/187383
Log: - MFC r185707: - Eliminate unused variable. [1] - Check for runt frames entering the stack. [2] Suggested by: ganbold[1], yongari[2] Modified: stable/7/sys/dev/ae/if_ae.c Modified: stable/7/sys/dev/ae/if_ae.c ============================================================================== --- stable/7/sys/dev/ae/if_ae.c Sun Jan 18 09:44:33 2009 (r187382) +++ stable/7/sys/dev/ae/if_ae.c Sun Jan 18 11:17:46 2009 (r187383) @@ -1103,12 +1103,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. */ @@ -1865,8 +1862,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); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"