From f1837c869fc34b7da21142a0a34191d5c8eea88c Mon Sep 17 00:00:00 2001 From: ge9 <37699433+ge9@users.noreply.github.com> Date: Wed, 4 Dec 2024 13:49:49 +0900 Subject: [PATCH] revert a change in DST.ADDR and DST.PORT of UDP Associate request (#210) (#211) --- socks5-udp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/socks5-udp.c b/socks5-udp.c index 66544ec..19f1f8e 100644 --- a/socks5-udp.c +++ b/socks5-udp.c @@ -51,7 +51,10 @@ static struct evbuffer* socks5_mkpassword_plain_wrapper(void *p) static struct evbuffer* socks5_mkassociate(void *p) { - return socks5_mkcommand_plain(socks5_cmd_udp_associate, p); + struct sockaddr_storage sa; + memset(&sa, 0, sizeof(sa)); + sa.ss_family = ((const struct sockaddr_storage *)p)->ss_family; + return socks5_mkcommand_plain(socks5_cmd_udp_associate, &sa); } static void socks5_fill_preamble(