Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Mar 2006 22:41:56 +0100
From:      "Dominique Goncalves" <dominique.goncalves@gmail.com>
To:        "Sam Leffler" <sam@errno.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: hostap mode and wpa-psk with ral(4) problem
Message-ID:  <7daacbbe0603061341s2e541d0die43486aa9becf124@mail.gmail.com>
In-Reply-To: <440C9F0C.4090009@errno.com>
References:  <20060305120018.EEC9B16A424@hub.freebsd.org> <440B0620.8080309@vip.hr> <1141574344.1146.18.camel@godzilla.jubba.nl> <440C9F0C.4090009@errno.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On 3/6/06, Sam Leffler <sam@errno.com> wrote:
> Jacco Braat wrote:
> > Hi,
> >
> > more people have problem with ral driver in hostap mode. the maintainer
> > knows about it and promised to look into it before 6.1 release
> > http://damien.bergamini.free.fr/ral/forum/read.php?f=3D1&i=3D225&t=3D16=
3#reply_225
> >
> > authentication is succesfull, but there is a problem with arp and dhcp.
> >
> > in sys/net80211/ieee80211_input.c (ieee80211_deliver_data) there is som=
e
> > code to bridge incomming packets to other connected stations. It looks
> > like the driver does not handle these packets correctly.
> >
> > ifconfig wifi0 -apbridge
> >
> > disables this feature, then you should be able to connect normally
>
> I just tested both ath and ral in hostap w/ wpa-psk and both worked fine
> for me (powerbook as sta/supplicant, tkip for ptk+gtk).  I did notice
> one bogon in ieee80211_deliver_data that might be causing the problem.
> When apbridge is enabled multicast frames are duplicated with
> m_copypacket which does a shallow copy and not a deep copy of the frame.
>   If the data resides in a cluster (as is typical) then when the frame
> is turned around for retransmit over the wireless interface the output
> path may alter the mbuf contents.  If this happens before the original
> packet gets passed through the bridge and out the wired interface then I
> can imagine problems of the sort reported.  Not sure why this never
> surfaced before but if I'm right the attached change should fix the
> problem (the patch is against stable but should be usable on head).
>
>         Sam
>
>
> Index: ieee80211_input.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /usr/ncvs/src/sys/net80211/ieee80211_input.c,v
> retrieving revision 1.62.2.9
> diff -u -r1.62.2.9 ieee80211_input.c
> --- ieee80211_input.c   16 Feb 2006 16:57:24 -0000      1.62.2.9
> +++ ieee80211_input.c   6 Mar 2006 20:25:29 -0000
> @@ -674,7 +674,7 @@
>                 struct mbuf *m1 =3D NULL;
>
>                 if (ETHER_IS_MULTICAST(eh->ether_dhost)) {
> -                       m1 =3D m_copypacket(m, M_DONTWAIT);
> +                       m1 =3D m_dup(m, M_DONTWAIT);
>                         if (m1 =3D=3D NULL)
>                                 ifp->if_oerrors++;
>                         else

Your patch fix the problem, tested on RELENG_6

$ uname -a
FreeBSD djdomics.sceen.net 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #3:
Mon Mar  6 22:11:14 CET 2006   =20
root@djdomics.sceen.net:/usr/obj/usr/src/sys/DJDOMICS  i386

Thank you, your work is much appreciated.

> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org=
"
>
>


--
There's this old saying: "Give a man a fish, feed him for a day. Teach
a man to fish, feed him for life."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7daacbbe0603061341s2e541d0die43486aa9becf124>