Closed gerald-dotcom closed 4 years ago
Just to let you know, I tried this on Bare Metal instance and it didn't worked either. Same output!!
Well, I had chance to get the packet and frame lengths so here is the output of both of them,
Raw Packet Size is 66 Raw Frame Length is 66
I'm not sure why this error is happening. It's coming from tcpdump, right? You probably need to debug it on your own environment. I don't think I can reproduce it on my environment.
I'm not sure why this error is happening. It's coming from tcpdump, right? You probably need to debug it on your own environment. I don't think I can reproduce it on my environment.
Yes, It's coming from tcpdump.
I believe a bug reside in your lib because I used another lib called libtins and it forwarded packets, TCP Dump didn't show any error for that lib.
You can create a Docker container and run TCPDump inside it then forward packets to docker0 interface.
@seladb I tried your Pcap implementation and it's packet sending function, and can confirm, your pcap implementation works and shows correct output in TcpDump so I believe the bug resides in your PF_RIng's implementation
Yes that makes sense. Can you try to debug the issue on your environment? Let me know if you find the bug.
BTW, libtins uses libpcap under the hood so it makes sense that both libtins and PcapPlusPlus work with the libpcap implementation. So the question is what's wrong with the PF_RING implementation. It's possible that the issue resides on the PF_RING side also. You need to further debug.
I'm unable debug your lib due to the complexity.
From: seladb notifications@github.com Sent: Saturday, July 11, 2020 6:42 PM To: seladb/PcapPlusPlus PcapPlusPlus@noreply.github.com Cc: Cornelius Jackson cornelius@neliusproperties.com; Author author@noreply.github.com Subject: Re: [seladb/PcapPlusPlus] Forwarding Packets causes bad hdr length 40 - too long (#497)
Yes that makes sense. Can you try to debug the issue on your environment? Let me know if you find the bug
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/seladb/PcapPlusPlus/issues/497#issuecomment-657148135, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOQKQCRYJO5BJSZ4IK7IYA3R3D2FZANCNFSM4OVCHHUA.
I don't think debugging it should be very complex. All you need to debug is PfRingDevice
, you can use gdb
or add printf
statements.
@seladb I don't think debugging would solve this. This has to do with how you parse packets because I see 60 total length of each packet.
Sorry, I don't have time to fiddle with this.
I will go with pcap.
I'm using PF_Ring to forward incoming packets (WITHOUT A SINGLE MODIFICATION) to a Bridge and running TCP Dump inside Bridge display a lot of logs that says bad hdr length 40 - too long.
My server is using virtio network interface and appear to be a KVM VM, bought from linode because VPS is cheaper for me than bare-metal.
DPDK is not the solution, don't direct me into that one. It might be easy for you but for me isn't.
My code,
You can see full log below,