]> tinc-vpn.org Git - tinc/commitdiff
Fix tarpitting logic detecting connections from the same host
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 28 Mar 2026 15:03:18 +0000 (16:03 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 28 Mar 2026 15:13:10 +0000 (16:13 +0100)
src/net_socket.c

index c8aa78824d51b8536c975291d9b99b4e9daf311b..37de873994010e9c6e27c9062dadaca05c881aea 100644 (file)
@@ -702,7 +702,7 @@ static bool check_tarpit(const sockaddr_t *sa, int fd) {
                }
        }
 
-       memcpy(&prev_sa, &sa, sizeof(sa));
+       prev_sa = *sa;
 
        // Check if we get many connections from different hosts