X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fnet_setup.c;h=af49ea09944092fa0b2d90575cb660c0c290924b;hb=307a2e9833748d147b34e935ef7680015af0772d;hp=238ae2d342dc316cd034f50289ad840c4a40881c;hpb=b70b090a28ff4cbdce29a3ad030f7d51ce9079b2;p=meshlink diff --git a/src/net_setup.c b/src/net_setup.c index 238ae2d3..af49ea09 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -422,7 +422,7 @@ static bool add_listen_sockets(meshlink_handle_t *mesh) { .ai_family = AF_UNSPEC, .ai_socktype = SOCK_STREAM, .ai_protocol = IPPROTO_TCP, - .ai_flags = AI_PASSIVE, + .ai_flags = AI_PASSIVE | AI_NUMERICSERV, }; int err = getaddrinfo(NULL, mesh->myport, &hint, &ai); @@ -521,7 +521,7 @@ static bool add_listen_sockets(meshlink_handle_t *mesh) { /* Configure node_t mesh->self and set up the local sockets (listen only) */ -bool setup_myself(meshlink_handle_t *mesh) { +static bool setup_myself(meshlink_handle_t *mesh) { /* Set some defaults */ mesh->maxtimeout = 900; @@ -565,7 +565,6 @@ bool setup_myself(meshlink_handle_t *mesh) { /* Done. */ - mesh->last_config_check = mesh->loop.now.tv_sec; mesh->last_unreachable = mesh->loop.now.tv_sec; return true;