X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol.c;h=20f66447c2a8ddc79f9a284b5522aa8513b1615f;hp=cb5c92fc75a0da49ab790fece8955d6ba3426673;hb=20301888b7a0a206119d2cfc48ccf1a667bb4add;hpb=bb3d18d56fa0dd2bc5146d0a0044b6ef0880bdb4 diff --git a/src/protocol.c b/src/protocol.c index cb5c92fc..20f66447 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.41 2000/10/16 16:33:30 guus Exp $ + $Id: protocol.c,v 1.28.4.42 2000/10/16 19:04:47 guus Exp $ */ #include "config.h" @@ -157,14 +157,14 @@ int send_id(conn_list_t *cl) cp cl->allow_request = CHALLENGE; cp - return send_request(cl, "%d %s %d %lx", ID, myself->name, myself->protocol_version, myself->options); + return send_request(cl, "%d %s %d %lx %hd", ID, myself->name, myself->protocol_version, myself->options, myself->port); } int id_h(conn_list_t *cl) { conn_list_t *old; cp - if(sscanf(cl->buffer, "%*d %as %d %lx", &cl->name, &cl->protocol_version, &cl->options) != 3) + if(sscanf(cl->buffer, "%*d %as %d %lx %hd", &cl->name, &cl->protocol_version, &cl->options, &cl->port) != 4) { syslog(LOG_ERR, _("Got bad ID from %s"), cl->hostname); return -1; @@ -204,7 +204,6 @@ cp if(cl->status.outgoing) { if((old = lookup_id(cl->name))) - if(old != cl) { if(debug_lvl > DEBUG_CONNECTIONS) syslog(LOG_NOTICE, _("Uplink %s (%s) is already in our connection list"), cl->name, cl->hostname);