X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fnet_setup.c;h=a82d5d97817610ca611195927a264713e4129141;hb=4b6c01b1d5383b1a7417244a31ad4652aab2d5db;hp=9cbdeb2691409f1c23c7221f0e9bf4af3d5b9b83;hpb=4c57e6902219ecca1872e18e34365d8e54a0f407;p=meshlink diff --git a/src/net_setup.c b/src/net_setup.c index 9cbdeb26..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);