All of lore.kernel.org
 help / color / mirror / Atom feed
* mac80211_hwsim: packets being transmitted through the monitor interface
@ 2019-09-27  1:54 Ramon Fontes
  2019-09-27 12:16 ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Ramon Fontes @ 2019-09-27  1:54 UTC (permalink / raw)
  To: linux-wireless

Hello,

I've noticed that packets transmitted between two clients connected to
a hostapd AP are also transmitted (injected) through the monitor
interface. Is this expected behavior? I can easily modify such
behavior by changing mac80211_hwsim, but it works only with hwsim0. On
the other hand, if I create a monitor interface via iw it doesn't
work.

--
Ramon Fontes

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mac80211_hwsim: packets being transmitted through the monitor interface
  2019-09-27  1:54 mac80211_hwsim: packets being transmitted through the monitor interface Ramon Fontes
@ 2019-09-27 12:16 ` Johannes Berg
  2019-09-27 12:30   ` Ramon Fontes
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2019-09-27 12:16 UTC (permalink / raw)
  To: Ramon Fontes, linux-wireless

On Thu, 2019-09-26 at 22:54 -0300, Ramon Fontes wrote:
> Hello,
> 
> I've noticed that packets transmitted between two clients connected to
> a hostapd AP are also transmitted (injected) through the monitor
> interface. Is this expected behavior? 

You mean on 'hwsim0'? That interface is just for monitoring what's
happening on the 'virtual air', so yes.

> I can easily modify such
> behavior by changing mac80211_hwsim, but it works only with hwsim0. On
> the other hand, if I create a monitor interface via iw it doesn't
> work.

The two are completely different/unrelated things.

johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mac80211_hwsim: packets being transmitted through the monitor interface
  2019-09-27 12:16 ` Johannes Berg
@ 2019-09-27 12:30   ` Ramon Fontes
  2019-09-27 12:35     ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Ramon Fontes @ 2019-09-27 12:30 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

Yes, I agree that they are different things, but I can also see the
packets through the monitor interface created via iw. Is this expected
too?

On Fri, Sep 27, 2019 at 9:16 AM Johannes Berg <johannes@sipsolutions.net> wrote:
>
> On Thu, 2019-09-26 at 22:54 -0300, Ramon Fontes wrote:
> > Hello,
> >
> > I've noticed that packets transmitted between two clients connected to
> > a hostapd AP are also transmitted (injected) through the monitor
> > interface. Is this expected behavior?
>
> You mean on 'hwsim0'? That interface is just for monitoring what's
> happening on the 'virtual air', so yes.
>
> > I can easily modify such
> > behavior by changing mac80211_hwsim, but it works only with hwsim0. On
> > the other hand, if I create a monitor interface via iw it doesn't
> > work.
>
> The two are completely different/unrelated things.
>
> johannes
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mac80211_hwsim: packets being transmitted through the monitor interface
  2019-09-27 12:30   ` Ramon Fontes
@ 2019-09-27 12:35     ` Johannes Berg
  2019-09-27 13:01       ` Ramon Fontes
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2019-09-27 12:35 UTC (permalink / raw)
  To: Ramon Fontes; +Cc: linux-wireless

[please quote properly]

On Fri, 2019-09-27 at 09:30 -0300, Ramon Fontes wrote:
> Yes, I agree that they are different things, but I can also see the
> packets through the monitor interface created via iw. Is this expected
> too?

The hwsim0 interface shows *all* packets on the virtual air.

A monitor interface created on one of the (hwsim or other!) wiphys shows
all packets seen by that device.

johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mac80211_hwsim: packets being transmitted through the monitor interface
  2019-09-27 12:35     ` Johannes Berg
@ 2019-09-27 13:01       ` Ramon Fontes
  2019-09-27 14:00         ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Ramon Fontes @ 2019-09-27 13:01 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

> A monitor interface created on one of the (hwsim or other!) wiphys shows
> all packets seen by that device.

Weird. When I try to reproduce the same with a physical network
interface, I can see no packets. It only shows the 802.11 protocol.
With mac80211_hwsim, in turn, I can see, for example, TCP packets and
their headers include the 802.11 header.

--
Ramon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mac80211_hwsim: packets being transmitted through the monitor interface
  2019-09-27 13:01       ` Ramon Fontes
@ 2019-09-27 14:00         ` Johannes Berg
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2019-09-27 14:00 UTC (permalink / raw)
  To: Ramon Fontes; +Cc: linux-wireless

On Fri, 2019-09-27 at 10:01 -0300, Ramon Fontes wrote:
> > A monitor interface created on one of the (hwsim or other!) wiphys shows
> > all packets seen by that device.
> 
> Weird. When I try to reproduce the same with a physical network
> interface, I can see no packets. It only shows the 802.11 protocol.
> With mac80211_hwsim, in turn, I can see, for example, TCP packets and
> their headers include the 802.11 header.

At least with mac80211 drivers that should work everywhere, though you
may get encrypted packets if software crypto is used, or crypto headers
if hardware crypto is used etc.

johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-09-27 14:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-27  1:54 mac80211_hwsim: packets being transmitted through the monitor interface Ramon Fontes
2019-09-27 12:16 ` Johannes Berg
2019-09-27 12:30   ` Ramon Fontes
2019-09-27 12:35     ` Johannes Berg
2019-09-27 13:01       ` Ramon Fontes
2019-09-27 14:00         ` Johannes Berg

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.