X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fnet_setup.c;h=a82d5d97817610ca611195927a264713e4129141;hb=4b6c01b1d5383b1a7417244a31ad4652aab2d5db;hp=238ae2d342dc316cd034f50289ad840c4a40881c;hpb=b70b090a28ff4cbdce29a3ad030f7d51ce9079b2;p=meshlink diff --git a/src/net_setup.c b/src/net_setup.c index 238ae2d3..a82d5d97 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,13 +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) { - /* Set some defaults */ - - mesh->maxtimeout = 900; - - /* Done */ - +static bool setup_myself(meshlink_handle_t *mesh) { mesh->self->nexthop = mesh->self; node_add(mesh, mesh->self); @@ -565,7 +559,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;