title: scapy 3 way handshake
body: <p>I am trying to build a scapy 3 way handshake. But when I send an Acknowledgement packet in response of SYN-ACK packet, I receive a FA packet instead of completion of 3 way handshake. My code is. </p>
  
  <pre><code>from scapy.all import*
  
  ip = IP(dst = "192.168.0.1")
  syn = TCP(dport=35021, flags="S", seq=100)
  synack = sr1(ip/syn, iface = "D-Link DUB-E100 USB 2.0 Fast Ethernet Adapter")
  ack = TCP(dport=35021, flags="A", seq=101, ack=synack.seq+1)
  ans=sr1(ip/ack, iface = "D-Link DUB-E100 USB 2.0 Fast Ethernet Adapter")
  </code></pre>
  
  <p>The output which I receive in the end is,</p>
  
  <pre><code>&gt;&gt;&gt; ans
  &lt;IP  version=4 ihl=5 tos=0x0 len=40 id=22653 flags=DF frag=0 ttl=64 proto=tcp chksum=0x6003 src=192.168.0.1 dst=192.168.0.254
  options=[] |&lt;TCP  sport=35021 dport=ftp_data seq=4141767969L ack=101 dataofs=5 reserved=0 flags=FA window=1500 chksum=0x4a61 u
  rgptr=0 |&lt;Padding  load='\x00\x00\x00\x00\x00\x00' |&gt;&gt;&gt;
  </code></pre>
  
  <p>But when I send some data in ACK packet setting the 'flags=PA' I get a proper response against the data I send. </p>
  
  <p>Shouldn't it behave like, complete 3-way handshake first and then send data?
  I am using scapy on Windows10 with python 2.7 and scapy latest version.</p>