You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If WriteHeaderIncludePacket() is used for sending echo reply from network/ipv4/icmp.go then then programs that use raw sockets to watch for both request and reply packets start to experience failures. The replies sent on the wire appear correct and pass external tests however something seems to go terribly wrong with the looped copies of those packets.
The packet generated in an attempt to use WriteHeaderIncludePacket() is correct and includes the entire outgoing packet in the Data buffer. The packet received externally is identical to that sent using WritePacket(). I would like to use WriteHeaderIncludePacket as RFC 792 requires that the ICMP code also have some had in the IP header contents and WritePacket has no way to do that. (without patching) where WriteHeaderIncludePacket() is designed to allow this.
To reproduce: change the code in ipv4/icmp.go to create a full packet and use WriteHeaderIncludePacket() to send it. Then from the gvisor directory run "make tests". Six tests will fail, all with similar symptoms. RawSocketICMPTest::ExpectICMPSuccess() will fail.
It appears that this issue may have another root cause. The problem is resolved when a copy of the incoming packet in the icmp echo code is replaced with a deep copy, suggesting that the issue is related to header changes in the raw socket code being reflected in the outgoing echo packet
Uh oh!
There was an error while loading. Please reload this page.
If WriteHeaderIncludePacket() is used for sending echo reply from network/ipv4/icmp.go then then programs that use raw sockets to watch for both request and reply packets start to experience failures. The replies sent on the wire appear correct and pass external tests however something seems to go terribly wrong with the looped copies of those packets.
Specifically several tests in https://github.com/google/gvisor/blob/master/test/syscalls/linux/raw_socket_icmp.cc start failing.
The packet generated in an attempt to use WriteHeaderIncludePacket() is correct and includes the entire outgoing packet in the Data buffer. The packet received externally is identical to that sent using WritePacket(). I would like to use WriteHeaderIncludePacket as RFC 792 requires that the ICMP code also have some had in the IP header contents and WritePacket has no way to do that. (without patching) where WriteHeaderIncludePacket() is designed to allow this.
To reproduce: change the code in ipv4/icmp.go to create a full packet and use WriteHeaderIncludePacket() to send it. Then from the gvisor directory run "make tests". Six tests will fail, all with similar symptoms. RawSocketICMPTest::ExpectICMPSuccess() will fail.
Linux julian-desk.xxxxxxxxx 5.6.14-2rodete5-amd64 #1 SMP Debian 5.6.14-2rodete5 (2020-07-31 > 2018) x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: