[PATCH] Fixed bug with ap_rx_from_unknown_sta recursion

Dan Williams dcbw at redhat.com
Wed Jul 8 12:19:20 EDT 2009


On Wed, 2009-07-08 at 11:04 -0500, John Klehm wrote:
> On Wed, Jul 8, 2009 at 10:45 AM, Witold Sowa<witold.sowa at gmail.com> wrote:
> > ap_rx_from_unknown_sta was going into infinite recursion,
> > or could even crash because of corrupted pointer cast.
> > ---
> >
> >
> > -void ap_rx_from_unknown_sta(void *ctx, const u8 *addr)
> > +void ap_rx_from_unknown_sta(void *ctx, struct ieee80211_hdr *hdr,
> > size_t len)
> >  {
> >        struct wpa_supplicant *wpa_s = ctx;
> > -       ap_rx_from_unknown_sta(wpa_s->ap_iface->bss[0], addr);
> > +       hostapd_rx_from_unknown_sta(wpa_s->ap_iface->bss[0], hdr, len);
> >  }
> >
> 
> Is that last line change a typo?

Nope; that's the actual fix.  Otherwise ap_rx_from_unknown_sta() just
keeps calling itself over and over and over and over.

Dan




More information about the HostAP mailing list