All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: Christian Lamparter <chunkeey@googlemail.com>
Cc: linux-wireless@vger.kernel.org, Michael Buesch <mb@bu3sch.de>
Subject: Re: [RFT] p54: implement multicast + arp req PS filter
Date: Sun, 10 Apr 2011 00:23:51 +0400	[thread overview]
Message-ID: <201104100023.52526.jcmvbkbc@gmail.com> (raw)
In-Reply-To: <201104081508.27822.chunkeey@googlemail.com>

Hello.

> > So, I associated with that AP and obtained an IP address.
> Just a question, that popped into my head: "Have you enabled PS?
> either with "iw dev wlanX set power_save on" or
> ?iwconfig wlanX power on?, because the filters may be restricted
> to PSM.

I hadn't. LMAC API doc doesn't say that they're related.
This time I ran tests both with "iwconfig wlan0 power on" and without it.
Looks like PSM only makes kernel print "wlan0: detected beacon loss from AP - sending probe request".
I see no other effect.

> > I see that although ARP filter was set (I added printfs to both
> > branches above), all ARP requests pass through:
>  
> > (none):~# ./tcpdump -i wlan0 -nn -s0 arp
> hmm, what about "-p"? I think that the interface should not be in
> promisc mode since it might change the result.

My bad ):
So, I re-tested both cases with tcpdump -p.

In the ARP case, when there's no other traffic on p54spi, all ARP requests are dropped.
But if there's some egress traffic from p54spi, filter seems to work correctly: only ARP requests that match filter pass through.

In the multicast case filter seems to work correctly, but it treats broadcast as subject to that filtering too.
By default only 01:00:5e:00:00:01 gets into priv->mc_maclist, so we miss all broadcasts.

These two filters seem to interfere:
- if we set ARP filter and multicast filter without broadcast, we miss all ARPs if there's no egress traffic;
- if we set ARP filter and multicast filter with broadcast, or don't set multicast filter at all we get all ARPs.

This effect does not depend on filter setup order.

> on a second thought, maybe we should take tcpdump out of
> the equation all together and dump the raw data coming
> from the device when PSM is enabled.

Ok, I'm probably going to printk those raw packets to see what's going on with ARPs with and without traffic, if it makes sense. 

> > By the way, I see that ARP filter does not apply to the station
> > in IBSS or mesh mode. Is that intended?
> Really? No that's not intended, is this a shortcoming of the driver or
> of the stack?

I've found a comment in ieee80211_ifa_changed saying that ARP filtering is only supported in managed mode.

Thanks.
-- Max

  reply	other threads:[~2011-04-09 20:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-01 22:58 [RFT] p54: implement multicast + arp req PS filter Christian Lamparter
2011-04-07 23:28 ` Max Filippov
2011-04-08 13:08   ` Christian Lamparter
2011-04-09 20:23     ` Max Filippov [this message]
2011-04-09 22:24       ` Christian Lamparter
2011-04-09 23:34         ` Max Filippov
2011-04-09 23:54           ` Christian Lamparter
2011-04-10  0:41             ` Max Filippov
2011-04-13 21:48               ` Max Filippov
2011-04-14 19:13                 ` Christian Lamparter
2011-04-14 20:34                   ` Max Filippov

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=201104100023.52526.jcmvbkbc@gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=chunkeey@googlemail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mb@bu3sch.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.