Add reuseport for dsmbr

This commit is contained in:
oscar 2023-04-03 20:13:54 -04:00
parent 8baecb6340
commit 08ba52213c
1 changed files with 6 additions and 0 deletions

View File

@ -523,6 +523,12 @@ dsmbr_slave_ctrl_sock_create(void)
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) {
E("setsockopt() NODELAY %d\n", errno);
}