-
Notifications
You must be signed in to change notification settings - Fork 864
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
expression rejects all packets for IPv6 upper-layer protocol #600
Comments
For example, on Linux, we add information about memory-mapped capture support; see comments on GitHub issue the-tcpdump-group#600.
@yiyuandao wanted to follow up on your filtering question for tcpdump -i em1 udp and 'udp[10] & 1!=0' -vvv | grep -i 'IP6' |
This issue still exists (in tcp/udp). Is there a reason the syntax ought not to work? Since something like If we do want syntax like What is the desired behaviour? I was thinking of making a PR with these changes but I'm not sure what would be preferred. |
As the pcap-filter(7) man page explains it:
|
Closing as resolved (not a bug, but an improvement that remains to be made). |
Should this issue be left open to track it as an enhancement request? |
Alright, let's keep it reopened for a while longer. |
Is somebody working on this issue? What is to be implemented? If the compiler can generate instructions to find TCP port after IPv6 header, it should work for anything else inside the TCP header, shouldn't it? |
This is an old known problem, nobody is working on it now, as far as I am aware. Competent volunteers are welcome to contribute a solution. Ideally it would be best to discuss the solution in sufficient detail before spending time on the code. |
I agree. If it is not too complex, I believe I can provide some development capacity from my team. We would really like this thing to work, however, we have no experience with libpcap internals. What can be some next step? |
That might turn out a deeper rabbit hole than it seems because this problem is not to extend an existing dual-stack mapping of another packet data accessor onto UDP, but to introduce dual-stack mapping of packet data accessors for the first time. In any case, it should be helpful to study this and this documents, then you can have a look at Hopefully that's good enough a starting point. |
The second link (https://sharkfestus.wireshark.org/sharkfest.11/presentations/McCanne-Sharkfest'11_Keynote_Address.pdf) gives me HTTP 404. |
I think the Wireshark web sites are being reworked. Down link reported on Discord. |
The keynote itself can still be found on YouTube though: https://www.youtube.com/watch?v=XHlqIqPvKw8 |
A copy of the PDF is here. |
Thank you for raising this, www.tcpdump.org is now using the copy for the documentation reference. |
A possible work-around until a more robust solution is available: |
They are indeed being reworked, and a recent change inadvertently broke some links. https://sharkfestus.wireshark.org/sharkfest.11/presentations/McCanne-Sharkfest'11_Keynote_Address.pdf should be working again. |
I did a quick research about the topic and performed some very basic experiments. Here is bytecode for IPv4/TCP with dst port 80...
Bytecode for IPv4/TCP flags (currently same result as with
Here is bytecode for IPv6/TCP with dst port 80... It ignores IPv6 extension headers.
And for IPv6/TCP flags, it something like fails:
I do not see any reason why the last expression would not give something like this:
And expression After that, the much more difficult part would be to parse IPv6 extension headers... But I consider it to be another story. |
Loading of ports is regardless of L3 layer is done via |
When you study the bytecode, it helps to remember that by default you see the optimized version. You could use BPF Exam to get a slightly better view of what comes out of |
Hi,
I tried to run following command:
and got the following:
I checked the document pcap-filter.
and in the section 'expr relop expr':
I wonder is there any plan to add this filter for IPv6?
Thanks.
The text was updated successfully, but these errors were encountered: