1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-27 13:02:57 +00:00

SO_REUSEADDR per default on TCP LISTEN; so-reuseaddr=

This commit is contained in:
Gerhard Rieger 2023-10-26 19:45:01 +02:00
parent b5640dd707
commit 2a9623d61c
9 changed files with 714 additions and 242 deletions

View file

@ -153,7 +153,10 @@ int _xioopen_listen(struct single *xfd, int xioflags, struct sockaddr *us, sockl
applyopts_offset(xfd, opts);
applyopts_cloexec(xfd->fd, opts);
/* Phase prebind */
xiosock_reuseaddr(xfd->fd, proto, opts);
applyopts(xfd->fd, opts, PH_PREBIND);
applyopts(xfd->fd, opts, PH_BIND);
if (Bind(xfd->fd, (struct sockaddr *)us, uslen) < 0) {
Msg4(level, "bind(%d, {%s}, "F_socklen"): %s", xfd->fd,