-
Notifications
You must be signed in to change notification settings - Fork 902
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
PFRING ZC Not Working with ZMAP #694
Comments
The PF_RING code is almost a decade old at this point, and I no longer have access to a test setup for it. I assume we need code updates for it. ZMap implementation requires recompiling from source and setting a custom build flag, so make sure you're testing with that. |
Hi, I am investigating why zmap is not sending packets when using PF_RING, but it reports that it has. Since sending with the zc: mode would prevent me from capturing outgoing packets with tcpdump, I am just trying to send without it but compiling with the corresponding flags. I am able to verify that I should see packets on the tcpdump, i.e., I see sent packets with the zsend example application from PF_RING without the zc: prefix.
However, when running zmap:
It claims that the packet has been sent, but I can't see anythin on my tcpdump. Do you have any idea why this could be? |
I have found out several things in relation to this issue, one of them being a bug. In first place, when support for cooked mode was introduced (#504 ), PF_RING was left behind. The culprit being Line 45 in c4931bd
A possible solution I have tested would be to set
Without it, headers are not parsed correctly and no packets passes validation. In second place, packets are never actively flushed, and queues are only synced upon termination. While the sync should flush any small number of packets unsent when the sender finishes, I have tested that if a single probe to a single target is scheduled, no packet will be sent out. Increasing the number of probes above 512 flushes them automatically, so for large scans I believe packets will be sent. But any number of remaining packets (<512) at the end will be possibly not sent out. After looking into the PF_RING_ZC examples, I believe that queues should be synced within the timing-delay loop so that no packets are kept buffered while waiting, but I am a beginner in this area and I leave it up to you how this should be handled. As a workaround, I am flushing every single packet individually, which will degrade performance but will improve the latency observed by my probes, which is for my use-case relevant (latency measurements). |
ntop/PF_RING#818
Any ideas why PFRING ZC doesn't seem to work with ZMAP? Anyone had any luck with the 10gbe driver? :)
The text was updated successfully, but these errors were encountered: