gnunet-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-developers] bug: Session key exchange denied etc


From: I. Wronsky
Subject: [GNUnet-developers] bug: Session key exchange denied etc
Date: Wed, 8 May 2002 21:45:50 +0300 (EEST)

While tracking the handleHELO => "session key exchange denied"
problem with todays CVS ver, I atleast discovered that setting 
MAXNODES over 128 causes a good old segfault here. This is 
because of the "making sure that the value is a power of 2" in
connection.c/initConnection(). 

The routine first allocates CONNECTION_blacklist_
for CONNECTION_MAX_HOSTS_ and *then* the named
maximum is adjusted or even increased. If MAXNODES 
is set in config to 256, this routine you use

  i = 1;
  while (i<= CONNECTION_MAX_HOSTS_)
    i*=2;

  CONNECTION_MAX_HOSTS_ = i;

causes the new maxvalue to be 512.  Kaboom <- Space was
allocated for just 256. *ugh*.

... Anyway, after fixing the abovementioned problem
(by quoting out that 'fail safe' routine) and increasing
MAXHOSTS to 512 I noticed that also the 'session key 
exchange denied' problem disappeared. I presume the 
whole thing has something do with the fact that 
getting the hosts.tar.gz from the web gives 
>300 hosts, whereas the config file is set to use 
only 128 by default. This results in some weird 
behaviour, one is the key exchange problem and
the other is that the node wont write any credit/ files
(or atleast it started writing them as soon as
the other problem disappeared)! 

The implications of this might reach far so I didn't 
track the issue further. The correct solution is 
probably something on the lines of checking the 
codes behaviour on the situations where we have 
>=MAXNODES files in hosts/ directory.


ps. these bugs might cause severe problems to the
network in case everyone else too gets the 300 nodes 
and has her max set to 128. Atleast here the whole
credit thing went down the drain and queries were 
exchanged only with a couple of nodes out of the 
several that sent HELOs. 


 - W, the doomMonger :D






reply via email to

[Prev in Thread] Current Thread [Next in Thread]