Description
I'm trying to use the RPi to process and analyze port mirroring traffic. During my tests, it seems that certain packets are seen as RX errors on the ifconfig, and I can't see those packets using tcpdump. In my setup I use the RPi Ethernet port for the port mirroring and another interface is USB Ethernet one. When I switched cables and made the USB Ethernet the port mirroring interface the bug didn't occur.
I initially saw #2566 but tried to do rpi-update with no success.
To reproduce
- Connect RPi 3 B+ Ethernet port to Linux computer B.
- On the RPi (replace eth0 with ethernet interface if differ), execute tcpdump -nvvei eth0
- Use scapy or any other tool to send raw packet on the interface from computer B:
from scapy.all import * import base64 p = base64.b64decode(b'ACWQl0oGAAwpJ39+CABFAAPnCl5AAIAGAADAqGdwaChCRfVUAFAnrEUMl/K7CVAYgWDWXwAAR0VUIC9lbi11cy9ob21lcGFnZS9fc2MvanMvYTczNjM0NDItY2VjNjc0OTcvZGlyZWN0aW9uPWx0ci5sb2NhbGVzPWVuLXVzLnRoZW1lcz1zdGFydC5kcGk9cmVzb2x1dGlvbjF4L2EwLTQ4NjZjMy1mODVkOTQ3YS8yMy0zNTMwYzMtNGNjMWQ2ZmIvMTMtZjU3MDEyLTY4ZGRiMmFiL2IxLWUwNzU1Ni1jZjUzZGIzMi9maW5hbmNlLWpzLTE1LWJiNGYwMGIyNDhkZTYzODYwNjI4OTQ0ZTYwZDk2ZC1lNTc4MDk3MD92ZXI9Mi4wLjUzOTUuMjQxMDIgSFRUUC8xLjENCkFjY2VwdDogYXBwbGljYXRpb24vamF2YXNjcmlwdCwgKi8qO3E9MC44DQpSZWZlcmVyOiBodHRwOi8vcmVuZGVyaW5nLXdlc3R1cy10ZXN0LWljZWxhYi1wcmltZS5jbG91ZGFwcC5uZXQvDQpBY2NlcHQtTGFuZ3VhZ2U6IGVuLVVTDQpYLURvd25sb2FkLUluaXRpYXRvcjogc2NyaXB0PSJkb2MgREZEODsgc3BlY3VsYXRpdmU7IGh0bWwgdG9rZW5pemVyIEM5MTgiDQpVc2VyLUFnZW50OiBNb3ppbGxhLzUuMCAoV2luZG93cyBOVCA2LjE7IFRyaWRlbnQvNy4wOyBydjoxMS4wKSBsaWtlIEdlY2tvIFBUU1QvMTg0DQpBY2NlcHQtRW5jb2Rpbmc6IGd6aXAsIGRlZmxhdGUNCkhvc3Q6IHJlbmRlcmluZy13ZXN0dXMtdGVzdC1pY2VsYWItcHJpbWUuY2xvdWRhcHAubmV0DQpDb25uZWN0aW9uOiBLZWVwLUFsaXZlDQpDb29raWU6IHByaW1lX3VzZXJuYW1lPW1zbnByaW1lOyBwcmltZV9wYXNzd29yZD1BbXAzZCE7IFByZWZlcmVuY2VzTXNuPWV5SkliMjFsVUdGblpTSTZleUpUZEhKcGNHVnpJanBiWFN3aVRXVlRkSEpwY0dWTmIyUjFiR1Z6SWpwYlhTd2lUV0Z5YTJWMFEyOXVabWxuZFhKaGRHbHZiaUk2ZXlKTllYSnJaWFFpT2lKbGJpMVZVeUlzSWxOMWNIQnlaWE56VUhKdmJYQjBJanBtWVd4elpTd2lVSEpsWm1WeWNtVmtUR0Z1WjNWaFoyVkRiMlJsSWpvaVpXNHRWVk1pTENKRGIzVnVkSEo1UTI5a1pTSTZJbFZUSW4xOWZRMg0KDQo=') sendp(p, iface='INTERFACE)'
- You wont see the packet on tcpdump, and if you run ifconfig you'll see that RX error increased.
Expected behaviour
TCPDump or any raw capturing tool should receive the packet.
Actual behaviour
Packet seems to be considered as error and tcpdump doesn't see the packet.
System
Additional context
I ran raspinfo after switching cables (so now I use the RPi ethernet for regular networking and the USB dongle for the port tapping)