diff options
author | Anton Kling <anton@kling.gg> | 2024-06-09 22:05:53 +0200 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-06-09 22:05:53 +0200 |
commit | 15003d1b0abccc8bcef84386c4a6da176e41f883 (patch) | |
tree | d4f8c4f1602ee9e6c4332f3b0585d0e284d0f695 /kernel/network/tcp.c | |
parent | ddd796325c9c703f007f046ed9f6fd9eb0ba6383 (diff) |
Add UDP
Diffstat (limited to 'kernel/network/tcp.c')
-rw-r--r-- | kernel/network/tcp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/network/tcp.c b/kernel/network/tcp.c index 68628d8..aeabbf2 100644 --- a/kernel/network/tcp.c +++ b/kernel/network/tcp.c @@ -182,7 +182,9 @@ void handle_tcp(ipv4_t src_ip, const u8 *payload, u32 payload_length) { if (SYN == flags) { struct TcpConnection *con = internal_tcp_incoming(src_ip.d, src_port, 0, dst_port); - assert(con); + if(!con) { + return; + } con->ack = seq_num + 1; tcp_send_empty_payload(con, SYN | ACK); con->seq++; |