From d67d6c635f495ef3ce65cbbab504a580cf7e1be0 Mon Sep 17 00:00:00 2001 From: Steven Siloti Date: Fri, 17 Apr 2020 21:14:25 -0700 Subject: [PATCH] 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. --- src/session_impl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index c8ca12663..db48e3de8 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -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(); });