diff --git a/dsmbr/dsmbr.cc b/dsmbr/dsmbr.cc index 170febe..3c443bf 100755 --- a/dsmbr/dsmbr.cc +++ b/dsmbr/dsmbr.cc @@ -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); }