summaryrefslogtreecommitdiffstats
path: root/contrib/diff/src
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2011-10-28 15:44:09 +0000
committeradrian <adrian@FreeBSD.org>2011-10-28 15:44:09 +0000
commitdce52fa1190fc0da96a2049b9d5be90bf30fb8d5 (patch)
tree69f14ea0b84d2035d0c7ffae6034a8a76e6cc715 /contrib/diff/src
parentf9aa1bdb2352c88cffdc0726aeb78234ef991338 (diff)
downloadFreeBSD-src-dce52fa1190fc0da96a2049b9d5be90bf30fb8d5.zip
FreeBSD-src-dce52fa1190fc0da96a2049b9d5be90bf30fb8d5.tar.gz
When punting frames to the RX tap, free the mbufs since we've tampered with
their length. Without this, an error frame mbuf would: * have its size adjusted; * thrown at the radiotap code; * then since it's never consumed, the rxbuf/mbuf is then re-added to the RX descriptor list with the small size; * .. and the hardware ends up (sometimes) only DMA'ing part of a frame into the small buffer, chaining RX frames together (setting the more flag). I discovered this particular issue when doing some promiscuous radiotap testing; I found that I'd occasionally get rs_more set in RX descriptors w/ the first frame length being very small (sub-100 bytes.) The driver handles 2-descriptor RX frames (but not more), so this still worked; it was just odd. This is suboptimal and may benefit from being replaced with caching the m_pkthdr_len and m_len fields, then restoring them after completion.
Diffstat (limited to 'contrib/diff/src')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud