Attempting to send TCP SYN packet with data and RST with data, but raw data field disappears in transit. Why?

I'm attempting to craft a raw TCP packet to send over Ether in a raw socket on a linux client and server. The special part of the TCP packet is that I'm attempting to use the raw data field of the TCP SYN packet and RST packet to send data back and forth (for a proof of concept about an unused part of the TCP protocol).

I've disabled RST packets from my iptables on the server.

In short, here's my current situation:

  1. Client sends SYN with data is sent to server
  2. Server receives a SYN packet without data
  3. Server responds with a RST packet with data
  4. Client receives a RST packet without data

But, using the same socket, I can successfully do this:

  1. SYN without data sent to server
  2. Server receives a SYN packet
  3. Server responds with a SYN ACK packet with data
  4. Client receives a SYN ACK packet without data
  5. Client receives a PSH ACK packet with data

Can someone explain to me why the packets I send don't seem to make it to the server in the same way I send them?

Why am I receiving two packets (one with SYN ACK and one with PSH ACK) in my successful attempts?

SYN and RST packets seem to lose their data, but SYN ACK packets don't. Is this a firewall issue?

If so, how can I debug what's intercepting my packets?



Turns out the VMWare virtual adapter was modifying the packets in transit. When I did a packet capture on the host operating system, there were no issues transmitting data.

Need Your Help

Timer: canceling running task

java timer tomcat7 scheduled-tasks

I need to create async thread that runs once with a delay of 2 minutes and that can be killed at any moment. I saw several possible solutions:

Unable to add a new item to source control?

visual-studio-2008 svn version-control visual-sourcesafe

I hope someone can help here, we're having an incredibly annoying time with Visual Studio 2008 and Visual SourceSafe 8.