Add reuseport for dsmbr

This commit is contained in:
oscar 2023-04-03 20:13:54 -04:00
parent 8baecb6340
commit 08ba52213c

View File

@ -523,6 +523,12 @@ dsmbr_slave_ctrl_sock_create(void)
E("socket() returned %d\n", errno); E("socket() returned %d\n", errno);
} }
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable)) != 0) {
E("setsockopt() reuseaddr: %d\n", errno);
}
if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &enable, sizeof(enable)) != 0) {
E("setsockopt() reuseport: %d\n", errno);
}
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &enable, sizeof(enable)) < 0) { if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &enable, sizeof(enable)) < 0) {
E("setsockopt() NODELAY %d\n", errno); E("setsockopt() NODELAY %d\n", errno);
} }