-
Notifications
You must be signed in to change notification settings - Fork 5.2k
python-scapy no longer works with kernel 1.20170703-1 and higher using integrated wifi on pi0w and pi3 b+ #2171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you get wireshark ( Alternatively give clear and complete steps to create and demonstrate a working system, and then the steps needed to break it. |
Thanks for responding so quickly..
#! /usr/bin/env python def arp_monitor_callback(pkt): sniff(prn=arp_monitor_callback, filter="arp", store=0) |
In addition after it is “broken” you can plug in an external wifi dongle and it should work again. |
Thanks - I can reproduce the problem with the first 4.9 kernel release and not with the last 4.4 kernel. I won't need those traces. |
Wow that’s great..I was posting on the forum for about 2 months and nothing..I thought I was the only one having this issue...actually people were complaining that the dash button examples in the magpi did not work..but they do..it all depends on the distro.. |
The bad news is that there are 158 commits to the brcmfmac driver between those two releases, including a wholesale directory move, and the required Pi-specific patches appear after the last brcmfmac commit, so a simple |
In addition to the above, and probably for the same reason, I see issues with Pi0W WiFi and Multicast groups. In Wireless networks with IGMP snooping ON, the Pi-Zero W doesn't join the multicast groups, and does not get any Multicast packets, for example mDNS (Avahi-Daemon) fails to work on Pi0W onboard WiFi - but does work on other WiFi devices. This may or may not help push you in the correct direction. |
I think the change is something to do with the ARP offload support, but I haven't found exactly which commit is responsible. There are a few workarounds possible, but without some feedback from the brcmfmac maintainers I don't know which (if any) is the best. If you can build your own kernel, try this patch: commit c35c007e91a7ccb256daf90df210c4cbae522e36
Author: Phil Elwell <[email protected]>
Date: Thu Aug 24 16:16:16 2017 +0100
brcmfmac: Set BRCMF_ARP_OL_SNOOP when promiscuous.
This is a test patch to attempt to fix the inability to sniff ARP
packets in promiscuous mode. Do not apply to a production kernel.
See: https://github.com/raspberrypi/linux/issues/2171
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
index f877301..682760a 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -80,6 +80,7 @@ static void _brcmf_set_multicast_list(struct work_struct *work)
__le32 cnt_le;
char *buf, *bufp;
u32 buflen;
+ u32 mode;
s32 err;
ifp = container_of(work, struct brcmf_if, multicast_work);
@@ -134,6 +135,15 @@ static void _brcmf_set_multicast_list(struct work_struct *work)
if (err < 0)
brcmf_err("Setting BRCMF_C_SET_PROMISC failed, %d\n",
err);
+
+ if ((brcmf_fil_iovar_int_get(ifp, "arp_ol", &mode) == 0) && mode) {
+ if (ndev->flags & IFF_PROMISC)
+ mode |= BRCMF_ARP_OL_SNOOP;
+ else
+ mode &= ~BRCMF_ARP_OL_SNOOP;
+
+ brcmf_fil_iovar_int_set(ifp, "arp_ol", mode);
+ }
}
#if IS_ENABLED(CONFIG_IPV6) |
I’ve never built a kernel..can you point me to the instructions I should use...it’s time to learn.. |
These are our standard instructions: https://www.raspberrypi.org/documentation/linux/kernel/building.md Apply the patch after the |
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
Broadcom have provided an alternative patch that also restores ARP sniffing. It's now in the 4.9 tree and will be in the next rpi-update release. |
Phil,
That’s great news ... thanks again for the follow up on this!
…Sent from my iPad Air 2
On Aug 30, 2017, at 8:42 AM, Phil Elwell ***@***.***> wrote:
Broadcom have provided an alternative patch that also restores ARP sniffing. It's now in the 4.9 tree and will be in the next rpi-update release.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.
|
by the way I tried to patch the kernel using the code you gave me above and I got this error: then ...
@@ -134,6 +135,15 @@ static void _brcmf_set_multicast_list(struct work_struct *work)
} any ideas? |
You've almost certainly got whitespace/line wrap problems. Rather than waste your time on that, update your kernel to include the new patch and build that instead. |
kernel: vcsm: Allow both clean and invalidate to be requested kernel: brcmfmac: Disable ARP offloading when promiscuous See: raspberrypi/linux#2171
kernel: vcsm: Allow both clean and invalidate to be requested kernel: brcmfmac: Disable ARP offloading when promiscuous See: raspberrypi/linux#2171
Just downloaded the latest stretch update 4.9.41v7 #1023 sept. 7th and then ran rbi-update moved kernel to 4.9.48+ now it works again...so i’m Closing the issue .. thanks again for the great support.. |
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
commit 0871fa6 Author: Phil Elwell <[email protected]> Date: Thu Aug 24 16:16:16 2017 +0100 brcmfmac: Disable ARP offloading when promiscuous This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: raspberrypi/linux#2171 Signed-off-by: Phil Elwell <[email protected]> Gbp-Pq: Topic rpi Gbp-Pq: Name rpi_1355_0871fa6c31d9d449316adbe8f8dac4fe5ac5ecea.patch
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: raspberrypi#2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: raspberrypi#2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: raspberrypi#2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: raspberrypi#2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: raspberrypi#2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: raspberrypi#2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: raspberrypi#2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: raspberrypi#2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: #2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: raspberrypi/linux#2171 Signed-off-by: Phil Elwell <[email protected]>
BugLink: https://bugs.launchpad.net/bugs/1831219 BugLink: https://bugs.launchpad.net/bugs/1825235 This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: raspberrypi/linux#2171 Signed-off-by: Phil Elwell <[email protected]> (cherry picked from commit 94fc8c8dde62cfacbf139f2e3c24ccc019e2ee35 https://github.com/raspberrypi/linux rpi-5.0.y) Signed-off-by: Paolo Pisati <[email protected]> Acked-by: Stefan Bader <[email protected]> Acked-by: Connor Kuehl <[email protected]> Signed-off-by: Kleber Sacilotto de Souza <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: raspberrypi/linux#2171 Signed-off-by: Phil Elwell <[email protected]>
BugLink: https://bugs.launchpad.net/bugs/1831219 BugLink: https://bugs.launchpad.net/bugs/1825235 This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: raspberrypi/linux#2171 Signed-off-by: Phil Elwell <[email protected]> (cherry picked from commit 94fc8c8dde62cfacbf139f2e3c24ccc019e2ee35 https://github.com/raspberrypi/linux rpi-5.0.y) Signed-off-by: Paolo Pisati <[email protected]> Acked-by: Stefan Bader <[email protected]> Acked-by: Connor Kuehl <[email protected]> Signed-off-by: Kleber Sacilotto de Souza <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: raspberrypi/linux#2171 Signed-off-by: Phil Elwell <[email protected]>
This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to sniff ARP packets over WiFi. See: raspberrypi/linux#2171 Signed-off-by: Phil Elwell <[email protected]>
When sniffing for arp packets using python-scapy only the router and the machine scapy is running on show up. Before upgrading..ie. Kernel 1.20170405-1 scapy would return all arp packets. If I use a tenda wifi dongle scapy works properly.
I can provide a simple python example to demonstrate this. I will also be glad to provide any further doc you request..ie traces.. thanks
The text was updated successfully, but these errors were encountered: