[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] ssh_bind_listen() does not fail in windows when port is in use
[Thread Prev] | [Thread Next]
- Subject: Re: [BUG] ssh_bind_listen() does not fail in windows when port is in use
- From: Alberto Garcia <agarciaillera@xxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Thu, 21 Mar 2019 16:15:32 -0700
- To: libssh@xxxxxxxxxx
Hi, So, I found this code in bind_socket() function: if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, sizeof(opt)) < 0) { ssh_set_error(sshbind, SSH_FATAL, "Setting socket options failed: %s", strerror(errno)); freeaddrinfo (ai); CLOSE_SOCKET(s); return -1; } The socket has the SO_REUSEADDR so it does not fail when it is in use. I don't know why that's set. Does anyone knows what is the intention of it? Cheers On Thu, Mar 21, 2019 at 1:59 PM Alberto Garcia <agarciaillera@xxxxxxxxx> wrote: > Hi, > > I see that ssh_bind_listen() does not fail in windows when the > selected SSH_BIND_OPTIONS_BINDPORT is already taken by other listening > process. > > Cheers. > -- > Alberto García Illera > > GPG Public Key <https://goo.gl/yshdwh> > -- Alberto García Illera GPG Public Key <https://goo.gl/yshdwh>
Re: [BUG] ssh_bind_listen() does not fail in windows when port is in use | g4-lisz@xxxxxxxxxxxx |
[BUG] ssh_bind_listen() does not fail in windows when port is in use | Alberto Garcia <agarciaillera@xxxxxxxxx> |