From 43fde8d39ce9f6fa78f6a278ce0a1bf8107bfdee Mon Sep 17 00:00:00 2001 From: H2NCH2COOH Date: Sun, 10 Apr 2016 11:00:15 +0800 Subject: [PATCH] Fix bug for ss-server udp sendto_remote error (#578) --- src/udprelay.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/udprelay.c b/src/udprelay.c index ee55b480..129e4643 100644 --- a/src/udprelay.c +++ b/src/udprelay.c @@ -1176,6 +1176,7 @@ static void server_recv_cb(EV_P_ ev_io *w, int revents) remote_ctx->server_ctx = server_ctx; remote_ctx->addr_header_len = addr_header_len; memcpy(remote_ctx->addr_header, addr_header, addr_header_len); + memcpy(&remote_ctx->dst_addr, &dst_addr, sizeof(struct sockaddr_storage)); } else { ERROR("[udp] bind() error"); goto CLEAN_UP;