mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-23 08:03:54 +00:00
compare port as well
The whole remote_ctx is inserted into the cache and sockaddr_storage contains both address and port. Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
This commit is contained in:
+1
-1
@@ -1024,7 +1024,7 @@ static void server_recv_cb(EV_P_ ev_io *w, int revents)
|
||||
cache_lookup(conn_cache, key, HASH_KEY_LEN, (void *)&remote_ctx);
|
||||
|
||||
if (remote_ctx != NULL) {
|
||||
if (sockaddr_cmp_addr(&src_addr, &remote_ctx->src_addr, sizeof(src_addr))) {
|
||||
if (sockaddr_cmp(&src_addr, &remote_ctx->src_addr, sizeof(src_addr))) {
|
||||
remote_ctx = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user