X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;ds=sidebyside;f=src%2Fprotocol.c;h=879e06f1d54232ccd80e6829bcd5c54ed47902a9;hb=698191fd2f512f3618e2d60592fcd57cd750b965;hp=8d03cc0b4a92cd552ce4208b0989385fde4b86c7;hpb=ac47586552710425417ed80878f8f853c313b421;p=tinc diff --git a/src/protocol.c b/src/protocol.c index 8d03cc0b..879e06f1 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: protocol.c,v 1.28.4.56 2000/11/04 16:54:21 guus Exp $ + $Id: protocol.c,v 1.28.4.58 2000/11/04 22:57:32 guus Exp $ */ #include "config.h" @@ -225,7 +225,7 @@ cp } } cp - if((cfg = get_config_val(cl->config, publickey))) + if((cfg = get_config_val(cl->config, config_publickey))) { cl->rsa_key = RSA_new(); BN_hex2bn(&cl->rsa_key->n, cfg->data.ptr); @@ -561,6 +561,8 @@ cp if(cl->status.outgoing) cl->allow_request = ACK; + setup_vpn_connection(cl); + x = send_request(cl, "%d", ACK); cl->status.encryptout = 1; cp @@ -1037,7 +1039,9 @@ cp int send_ping(conn_list_t *cl) { +cp cl->status.pinged = 1; + cl->last_ping_time = time(NULL); cp return send_request(cl, "%d", PING); } @@ -1057,7 +1061,7 @@ cp int pong_h(conn_list_t *cl) { cp - cl->status.got_pong = 1; + cl->status.pinged = 0; cp return 0; }