-
Notifications
You must be signed in to change notification settings - Fork 69
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
When ping-ip's result compared to wireshark's packets, the content length of the packets is actually not right #60
When ping-ip's result compared to wireshark's packets, the content length of the packets is actually not right #60
Comments
@OrangeBook can you please give more detail. I don't understand what the problem is from your description. |
there is all description. just check the 3th and 4th bytes is not right from node-raw-socket. |
@OrangeBook so the length in the Can you share the program you are using to display this data so I can look further? |
should not so, maybe mixed return and send packet
@stephenwvickers , just run demo on |
@Talbot3 The example program works for me. |
yea, but my mean is the |
I just created https://stackoverflow.com/questions/74448657/why-might-wireshark-and-nodejs-disagree-about-a-packets-contents and was pointed to this issue. I also see this on macOS (so, perhaps this is macOS related). I've run the ping example in the following ways:
In every instance, the ICMP reply comes back with the length set to 0x2800 instead of 0x0040. Even setting aside the Wireshark evidence, the reply packet is wrong for a few reasons:
|
I've created a SSCCE here: https://github.com/dancrumb/sscce-raw-socket-ping |
Hmmm - this seems pertinent :/ https://cseweb.ucsd.edu//~braghava/notes/freebsd-sockets.txt Specifically:
|
FreeBSD does weird things to the length field in the IP header of a packet; this change reverts those changes so that there is a consistent experience across platforms ✅ Closes: nospaceships#60
fix: 🐛 deal with OSX handling of IPv4 header length
sent 40 bytes to 203.119.204.187 received 60 bytes from 203.119.204.187 data: 4514`2800`7ab7000053018255cb77ccbbc0a811c500004b5200010a096162636465666768696a6b6c6d6e6f7071727374757677616263646566676869
ENV: Node 12.4.0 OS: macos mojave 10.14.5
The text was updated successfully, but these errors were encountered: