Browse Source

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

pull/2790/head
Jared Pyzynski 3 years ago
committed by Max Lv
parent
commit
13f472077d
1 changed files with 5 additions and 0 deletions
  1. 5
      src/udprelay.c

5
src/udprelay.c

@ -869,6 +869,11 @@ remote_recv_cb(EV_P_ ev_io *w, int revents)
close(src_fd); close(src_fd);
goto CLEAN_UP; goto CLEAN_UP;
} }
if (reuse_port) {
if (set_reuseport(src_fd) != 0) {
ERROR("[udp] remote_recv port_reuse");
}
}
#ifdef IP_TOS #ifdef IP_TOS
// Set QoS flag // Set QoS flag
int tos = 46 << 2; int tos = 46 << 2;

Loading…
Cancel
Save