aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremias Stotter <jeremias@stotter.eu>2024-01-03 22:35:45 +0100
committerJeremias Stotter <jeremias@stotter.eu>2024-01-03 22:35:45 +0100
commit79079e88825722096cf69c00fab8af04aca8b8f1 (patch)
tree22411a71ff10344ebdec172c7959c159369ebb23
parent547f8cbd600ccb6cf7991a66dac7abcc784f949a (diff)
downloadnetwork-simulator-79079e88825722096cf69c00fab8af04aca8b8f1.tar.gz
network-simulator-79079e88825722096cf69c00fab8af04aca8b8f1.tar.bz2
network-simulator-79079e88825722096cf69c00fab8af04aca8b8f1.zip
Fixed a tcp error
Forgot to create the flags...
-rw-r--r--templates/tcplib/tcplib.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/tcplib/tcplib.lua b/templates/tcplib/tcplib.lua
index 4a1b255..64f8887 100644
--- a/templates/tcplib/tcplib.lua
+++ b/templates/tcplib/tcplib.lua
@@ -215,6 +215,9 @@ function connect_waiting(r_addr, header_fields, sock, after_connect, after_conne
end
tcp_sockets[sock]["ack"] = header_fields["seq"] + 1
+ flags = new_tcp_flagtable()
+ flags["ack"] = 1
+
-- Acknowledge to complete handshake
header = make_tcpheader(flags, tcp_sockets[sock]["port"], tcp_sockets[sock]["r_port"], tcp_sockets[sock]["seq"], tcp_sockets[sock]["ack"], 65535, 0, 0, "")
send_ip(header, tcp_sockets[sock]["r_addr"], tcp_sockets[sock]["addr"], iptypes["tcp"], 0, "tcp")
Jeremias Stotters git repositories generated by CGIT