Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Aug 2014 01:02:54 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Rui Paulo <rpaulo@freebsd.org>
Cc:        "freebsd-wireless@freebsd.org" <freebsd-wireless@freebsd.org>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: [rfc] INJECT mode for net80211
Message-ID:  <CAJ-Vmom0OQtLvcCp5TS12ag5M65gsS8=gV8JOKJ%2B0Q_8AqypMA@mail.gmail.com>
In-Reply-To: <80DB3DCF-496E-4596-B9F3-4D86AC82DEC5@FreeBSD.org>
References:  <CAJ-VmonhQwdQcTcEGrvwiTBDxiaOUAGYo=g%2BTaACR9oJaAh8Bw@mail.gmail.com> <80DB3DCF-496E-4596-B9F3-4D86AC82DEC5@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10 August 2014 00:54, Rui Paulo <rpaulo@freebsd.org> wrote:
> On Aug 9, 2014, at 23:41, Adrian Chadd <adrian@FreeBSD.org> wrote:
>
>> Hi!
>>
>> I kinda got fed up with the lack of functioning inject.
>>
>> * monitor mode isn't inject mode;
>> * ahdemo mode seems .. less useful.
>>
>> 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.
>>
>> So:
>>
>> http://people.freebsd.org/~adrian/ath/20140809-net80211-ath-inject-1.diff
>
> This patch looks incomplete.  Did you forget to diff sys/net?

Hm, try:

http://people.freebsd.org/~adrian/ath/20140809-net80211-ath-inject-2.diff

> 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.

How did it used to work?

* monitor mode very specifically doesn't define output methods at all;
* there's no temporary nodes created when transmitting, so it all
simply ends up being dropped because no txnode was found.

So perhaps there was some path via the raw output method which no
longer is working. The _output() method supposedly permits BPF
injected packets to work by sending packets using a node ==
vap->iv_bss, but that can't possibly work with the existing monitor
mode because code in ieee80211.c doesn't set the output methods for
monitor mode.



-a



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmom0OQtLvcCp5TS12ag5M65gsS8=gV8JOKJ%2B0Q_8AqypMA>