summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2016-07-07 11:56:53 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2016-07-07 11:56:53 -0400
commitfe1a5f6ef20eb5fda2505832b24b6ea2f903e379 (patch)
tree8df2282cf4df65636e0beed1ea78096fc1f9d641 /src
parent22f9339331d52b53d87b93434a14c2190f4e12f4 (diff)
downloadudpastcp-fe1a5f6ef20eb5fda2505832b24b6ea2f903e379.tar.xz
udpastcp-fe1a5f6ef20eb5fda2505832b24b6ea2f903e379.zip
Fix SYN sequence number.
Finally protocol is Wireshark-clean.
Diffstat (limited to 'src')
-rw-r--r--src/client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/client.c b/src/client.c
index c78f3b1..1c3fb4e 100644
--- a/src/client.c
+++ b/src/client.c
@@ -180,6 +180,7 @@ static int c_send_syn(struct o_c_sock *sock) {
.th_flags = TH_SYN
};
c_prep_s_addr(sock, &buf);
+ sock->seq_num++;
uint16_t tsz = htons(sizeof(buf));
buf.th_sum = ~csum_partial(&buf.th_seq, 16, csum_partial(&tsz, sizeof(tsz), sock->csum_p));