Drop frames that have larger than MCLBYTES.

This commit is contained in:
Kevin Lo 2014-09-09 05:21:31 +00:00
parent a4d98bf442
commit 141aa3b93a

View File

@ -660,6 +660,10 @@ urtwn_rx_frame(struct urtwn_softc *sc, uint8_t *buf, int pktlen, int *rssi_p)
ifp->if_ierrors++;
return (NULL);
}
if (pktlen < sizeof(*wh) || pktlen > MCLBYTES) {
ifp->if_ierrors++;
return (NULL);
}
rate = MS(rxdw3, R92C_RXDW3_RATE);
infosz = MS(rxdw0, R92C_RXDW0_INFOSZ) * 8;