projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't declare cp_file and cp_line in xmalloc()
[tinc]
/
src
/
protocol.c
diff --git
a/src/protocol.c
b/src/protocol.c
index
cb5c92f
..
20f6644
100644
(file)
--- 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.
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.4
1 2000/10/16 16:33:30
guus Exp $
+ $Id: protocol.c,v 1.28.4.4
2 2000/10/16 19:04:47
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-157,14
+157,14
@@
int send_id(conn_list_t *cl)
cp
cl->allow_request = CHALLENGE;
cp
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
}
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;
{
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(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);
{
if(debug_lvl > DEBUG_CONNECTIONS)
syslog(LOG_NOTICE, _("Uplink %s (%s) is already in our connection list"), cl->name, cl->hostname);