* Ignoring destination MAC address in incoming packets
@ 2013-04-08 7:08 Krzysztof Halasa
2013-04-08 7:19 ` Antonio Quartulli
0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Halasa @ 2013-04-08 7:08 UTC (permalink / raw)
To: netdev
Hi,
I have a bit unusual problem today. Is there a way to ignore destination
MAC address in incoming packets?
I need to do this on Atheros Wi-Fi. Basically what I need to achieve is
a sniffer.
Something like this:
- ATH5k working in ad-hoc mode, certain ESSID and channel selected.
- UDP packets in certain range are to be forwarded to other IPs.
- the wifi interface must be able to normally communicate (within its
ESSID and channel).
- it has to work with iptables etc. (DNAT, routing).
I know I can change a line in the kernel (the one setting pkt_type to
OTHER_HOST) but perhaps there is some standard way for things like this?
Or should I use AF_PACKET and forward the data with userspace helper?
Any other idea?
TIA.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Ignoring destination MAC address in incoming packets
2013-04-08 7:08 Ignoring destination MAC address in incoming packets Krzysztof Halasa
@ 2013-04-08 7:19 ` Antonio Quartulli
2013-04-08 7:49 ` Krzysztof Halasa
0 siblings, 1 reply; 3+ messages in thread
From: Antonio Quartulli @ 2013-04-08 7:19 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: netdev
[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]
On Mon, Apr 08, 2013 at 09:08:21AM +0200, Krzysztof Halasa wrote:
> Hi,
>
> I have a bit unusual problem today. Is there a way to ignore destination
> MAC address in incoming packets?
>
> I need to do this on Atheros Wi-Fi. Basically what I need to achieve is
> a sniffer.
>
> Something like this:
> - ATH5k working in ad-hoc mode, certain ESSID and channel selected.
> - UDP packets in certain range are to be forwarded to other IPs.
> - the wifi interface must be able to normally communicate (within its
> ESSID and channel).
> - it has to work with iptables etc. (DNAT, routing).
>
> I know I can change a line in the kernel (the one setting pkt_type to
> OTHER_HOST) but perhaps there is some standard way for things like this?
>
> Or should I use AF_PACKET and forward the data with userspace helper?
>
> Any other idea?
May be a stupid suggestion, but what about setting promisc mode on?
Cheers,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Ignoring destination MAC address in incoming packets
2013-04-08 7:19 ` Antonio Quartulli
@ 2013-04-08 7:49 ` Krzysztof Halasa
0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Halasa @ 2013-04-08 7:49 UTC (permalink / raw)
To: Antonio Quartulli; +Cc: netdev
Antonio Quartulli <ordex@autistici.org> writes:
> May be a stupid suggestion, but what about setting promisc mode on?
I use promiscuous mode, but the packets are still dropped because
skb->pkt_type = PACKET_OTHERHOST (since the destination MAC address
doesn't match and is not broadcast/multicast).
I realize accepting all packets blindly opens a can of worms and this
must be well thought. Perhaps a user space tool using AF_PACKET is a
better way?
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-08 7:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-08 7:08 Ignoring destination MAC address in incoming packets Krzysztof Halasa
2013-04-08 7:19 ` Antonio Quartulli
2013-04-08 7:49 ` Krzysztof Halasa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox