1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-06 21:16:34 +00:00

Again fixes a few disable problems

This commit is contained in:
Gerhard 2025-02-20 10:29:49 +01:00
parent 6a53c955d3
commit 34b09a44ee
3 changed files with 8 additions and 0 deletions

View file

@ -2349,11 +2349,13 @@ int xiosock_reuseaddr(int fd, int ipproto, struct opt *opts)
}
#endif /* WITH_TCP */
result = retropt_2integrals(opts, OPT_SO_REUSEADDR, &val, &notnull);
#if WITH_TCP
if (ipproto == IPPROTO_TCP && result < 0) {
Info("Setting SO_REUSADDR on TCP listen socket implicitly");
val.u_int = 1;
notnull.u_bool = true;
}
#endif /* WITH_TCP */
if (notnull.u_bool) {
if (Setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val.u_int, sizeof(int))
!= 0) {