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:
parent
b5640dd707
commit
2a9623d61c
9 changed files with 714 additions and 242 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue