From owner-freebsd-current@FreeBSD.ORG Mon Mar 6 21:42:11 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA8CD16A420 for ; Mon, 6 Mar 2006 21:42:11 +0000 (GMT) (envelope-from dominique.goncalves@gmail.com) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 327A143D4C for ; Mon, 6 Mar 2006 21:41:58 +0000 (GMT) (envelope-from dominique.goncalves@gmail.com) Received: by nproxy.gmail.com with SMTP id q29so983254nfc for ; Mon, 06 Mar 2006 13:41:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=arP6srVHJ5VnIoIdUKZFYMjz8i/czu38SOWQNLFLk8VTbpgKWU9civRSvirjctCqSsi95lRWJCM+E/OqLTI0G0oI7GY+rowQ0dgCHymL2QMX7c9F/7KQrzp/RxQBWEFghWfFZ6rhd0+JAhp3MVYAdW6GQCCR6KOh7Ty0UILXP84= Received: by 10.49.41.4 with SMTP id t4mr2644590nfj; Mon, 06 Mar 2006 13:41:56 -0800 (PST) Received: by 10.48.255.9 with HTTP; Mon, 6 Mar 2006 13:41:56 -0800 (PST) Message-ID: <7daacbbe0603061341s2e541d0die43486aa9becf124@mail.gmail.com> Date: Mon, 6 Mar 2006 22:41:56 +0100 From: "Dominique Goncalves" To: "Sam Leffler" In-Reply-To: <440C9F0C.4090009@errno.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060305120018.EEC9B16A424@hub.freebsd.org> <440B0620.8080309@vip.hr> <1141574344.1146.18.camel@godzilla.jubba.nl> <440C9F0C.4090009@errno.com> Cc: freebsd-current@freebsd.org Subject: Re: hostap mode and wpa-psk with ral(4) problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2006 21:42:12 -0000 Hi, On 3/6/06, Sam Leffler 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."