Fix "ERROR: [udp] remote_recv_bind: Address already in use" when multiple reuse_port-enabled ss-redir instances are listening on the same address

This commit is contained in:
Jared Pyzynski
2021-01-30 07:27:00 +08:00
committed by Max Lv
parent cfe0c2cba0
commit 13f472077d
+5
View File
@@ -869,6 +869,11 @@ remote_recv_cb(EV_P_ ev_io *w, int revents)
close(src_fd);
goto CLEAN_UP;
}
if (reuse_port) {
if (set_reuseport(src_fd) != 0) {
ERROR("[udp] remote_recv port_reuse");
}
}
#ifdef IP_TOS
// Set QoS flag
int tos = 46 << 2;