check flags when matching listen sockets

If the flags change the socket needs to be re-opened. This is
particularly important when the local_network flag changes so that
the socket will correctly be treated as global even if the gateway
was not configured when the address was first detected.

Don't just modify the flags of the existing listen socket because
some flags may influence how the socket is opened. Such flags could
be special cased, but it doesn't seem worth the trouble.
This commit is contained in:
Steven Siloti 2020-04-17 21:14:25 -07:00 committed by Arvid Norberg
parent b403e01569
commit d67d6c635f
1 changed files with 1 additions and 0 deletions

View File

@ -221,6 +221,7 @@ namespace aux {
return ep.ssl == sock->ssl
&& ep.port == sock->original_port
&& ep.device == sock->device
&& ep.flags == sock->flags
&& ep.addr == sock->local_endpoint.address();
});