From: Michael Buesch <mb@bu3sch.de>
To: Ivo van Doorn <ivdoorn@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
"John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH 18/24] rt2x00: Add Multicast/Broadcast filtering
Date: Fri, 3 Aug 2007 22:11:26 +0200 [thread overview]
Message-ID: <200708032211.26389.mb@bu3sch.de> (raw)
In-Reply-To: <200708031736.27782.IvDoorn@gmail.com>
On Friday 03 August 2007, Ivo van Doorn wrote:
> On Friday 03 August 2007, Johannes Berg wrote:
> > On Fri, 2007-08-03 at 17:09 +0200, Ivo van Doorn wrote:
> > > On Friday 03 August 2007, Johannes Berg wrote:
> > > > On Tue, 2007-07-31 at 20:37 +0200, Ivo van Doorn wrote:
> > > >
> > > > > + if (is_monitor_present(intf)) {
> > > > > + filter = IFF_PROMISC | IFF_MULTICAST | IFF_BROADCAST;
> > > > > + if (intf->filter != filter)
> > > > > + __set_bit(PACKET_FILTER_PENDING, &rt2x00dev->flags);
> > > > > + }
> > > >
> > > > Don't do that. There's no requirement that monitor mode interfaces
> > > > always be promisc. Also, earlier in the code:
> > >
> > > Note that this "Enable promisc" on monitor mode here will only be send to
> > > the device. It does not mean that the non-monitor mode will have promisc
> > > mode enabled. In fact, when the monitor interface goes down, the normal
> > > setting will be used again.
> > > If with monitor mode, IFF_PROMISC is not send to the device, monitor
> > > mode is useless since it will not catch anything except beacons
> > > (Especially true when you only have 1 interface which is in monitor mode)
> >
> > But don't you allow monitoring during operation? In that case this would
> > make that monitor interface always promisc which isn't what you want
> > unless you set the promisc bit on any of the interfaces.
>
> But that would mean that when a non-monitor and monitor interface are
> enabled at the same time, the montitor interface is quite pointless since
> all frames can be caught on the regular interface as well.
>
> A monitor interface is supposed to catch as many frames as possible,
> if a monitor interface does not catch frames not directly send to it, it won't
> catch anything except beacons.
>
> Even when there is only 1 interface which is in monitor mode, the user shouldn't
> have to set the device into promisc mode right?
You are wrong.
The promisc attribute is a _different_ setting from the monitor
bits. If userspace wants promisc, it tells you (through set mcast_list stuff).
And tcpdump/wireshark and stuff _do_ this.
If userspace wants a nonpromisc monitor, it should be allowed to have one.
Don't put policy into the kernel and make bad assumptions like
"monitor interface wants to be promisc".
prev parent reply other threads:[~2007-08-03 20:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-31 18:37 [PATCH 18/24] rt2x00: Add Multicast/Broadcast filtering Ivo van Doorn
2007-08-03 14:01 ` Johannes Berg
2007-08-03 15:09 ` Ivo van Doorn
2007-08-03 15:20 ` Johannes Berg
2007-08-03 15:36 ` Ivo van Doorn
2007-08-03 15:42 ` Johannes Berg
2007-08-03 16:04 ` Ivo van Doorn
2007-08-03 19:34 ` Johannes Berg
2007-08-03 20:11 ` Michael Buesch [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200708032211.26389.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=ivdoorn@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).