X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_socket.c;h=e7634996e356712937157fc26a50c8a2d02564fa;hp=f49832f806a0ebad09d612ffdcc6323be6457190;hb=c6b1643c2bcc727db4aed69bc58eb1f31903fdcf;hpb=c0af4c37d2046ffb3e07dd62f266a4fb99ea5614 diff --git a/src/net_socket.c b/src/net_socket.c index f49832f8..e7634996 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -294,9 +294,6 @@ void retry_outgoing(outgoing_t *outgoing) { void finish_connecting(connection_t *c) { ifdebug(CONNECTIONS) logger(LOG_INFO, "Connected to %s (%s)", c->name, c->hostname); - if(proxytype != PROXY_EXEC) - configure_tcp(c); - c->last_ping_time = now; send_id(c); @@ -352,7 +349,7 @@ static void do_outgoing_pipe(connection_t *c, char *command) { void do_outgoing_connection(connection_t *c) { char *address, *port, *space; - struct addrinfo *proxyai; + struct addrinfo *proxyai = NULL; int result; if(!c->outgoing) { @@ -419,6 +416,7 @@ begin: goto begin; ifdebug(CONNECTIONS) logger(LOG_INFO, "Using proxy at %s port %s", proxyhost, proxyport); c->socket = socket(proxyai->ai_family, SOCK_STREAM, IPPROTO_TCP); + configure_tcp(c); } if(c->socket == -1) {