From owner-freebsd-arch@FreeBSD.ORG Sun Aug 10 07:54:12 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90D9BAB; Sun, 10 Aug 2014 07:54:12 +0000 (UTC) Received: from felyko.com (felyko.com [65.49.80.26]) by mx1.freebsd.org (Postfix) with ESMTP id 7AF9E24AB; Sun, 10 Aug 2014 07:54:12 +0000 (UTC) Received: from [IPv6:2601:9:8280:5fd:d5a4:20d0:8128:6903] (unknown [IPv6:2601:9:8280:5fd:d5a4:20d0:8128:6903]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 7806334AAC9; Sun, 10 Aug 2014 00:54:11 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [rfc] INJECT mode for net80211 From: Rui Paulo In-Reply-To: Date: Sun, 10 Aug 2014 00:54:26 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <80DB3DCF-496E-4596-B9F3-4D86AC82DEC5@FreeBSD.org> References: To: Adrian Chadd X-Mailer: Apple Mail (2.1878.6) Cc: "freebsd-wireless@freebsd.org" , "freebsd-arch@freebsd.org" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 07:54:12 -0000 On Aug 9, 2014, at 23:41, Adrian Chadd wrote: > Hi! >=20 > I kinda got fed up with the lack of functioning inject. >=20 > * monitor mode isn't inject mode; > * ahdemo mode seems .. less useful. >=20 > So I just created IEEE80211_M_INJECT and taught net80211 / ath about > it. This is like monitor mode (straight to RUN, no need to set an > SSID, no auto scanning by default) but it allows transmit and > populates the node table with temporary node entries. >=20 > So: >=20 > = http://people.freebsd.org/~adrian/ath/20140809-net80211-ath-inject-1.diff This patch looks incomplete. Did you forget to diff sys/net? > I'd like to commit this in the next couple of days. >=20 > I've also tested this with aircrack-ng - the built port didn't work > with monitor mode modified to inject frames. I don't know why. Rebuilt > from source worked fine. I've just modified my local copy to set the > IFM_IEEE80211_INJECT flag rather than monitor flag and it seems it's > all okay. >=20 > The only issue I've seen with packet injection is that aircrack-ng > isn't waiting until the interface is up before trying to send frames, > so some are rejected rather than buffered. In general, I'd prefer to have one mode. aircrack used to work in = monitor mode, so I'm surprised the problem is the lack of an inject = mode. Looking at the code, you're pretty much defining INJECT to be = MONITOR mode. -- Rui Paulo