Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/usb



On Tue, Jan 29, 2013 at 08:54:27AM -0500, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date:         Tue Jan 29 13:54:27 UTC 2013
> 
> Modified Files:
>       src/sys/dev/usb: if_otus.c if_otusvar.h
> 
> Log Message:
> 1) Use ic_curchan consistently
> 2) Ignore frames shorter than sizeof(struct ieee80211_frame).

I'm assuming that this is on the input path.

+       mlen -= IEEE80211_CRC_LEN;      /* strip 802.11 FCS */
+       /* Make sure there's room for an 802.11 header. */
+       /*
+        * XXX: This will drop most control packets.  Do we really
+        * want this in IEEE80211_M_MONITOR mode?
+        */
+       if (__predict_false(mlen < sizeof(*wh))) {

I'm sure that the driver behavior is all over the place, but it is most
useful to pass to the radiotap before trimming FCS and dropping runts.
Perhaps dropping runts can be left to ieee80211_input()?  It may be less
strict about what qualifies as a runt,

        if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) {
                IEEE80211_DISCARD_MAC(ic, IEEE80211_MSG_ANY,
                    ni->ni_macaddr, NULL,
                    "too short (1): len %u", m->m_pkthdr.len);
                ic->ic_stats.is_rx_tooshort++;
                goto out;
        }

Dave

-- 
David Young
dyoung%pobox.com@localhost    Urbana, IL    (217) 721-9981


Home | Main Index | Thread Index | Old Index