friend of a friend type darknets
Guus Sliepen
guus at tinc-vpn.org
Mon Sep 20 17:59:40 CEST 2010
On Mon, Sep 20, 2010 at 03:39:32PM +0200, Alex wrote:
> > No, since that will be two distinct edges, a B->A edge and a C->A edge. But
> > suppose A has FriendOfAFriend set, but B and C do not, and B and C are also
> > connected to each other. Then it is possible that the B->C edge information
> > (that B sends to A and C at some point) gets anonymised by A and forwarded to
> > C, which sees new information, and forwards it in turn to B, which will see
> > that someone forwarded the B->C edge, but with wrong IP address information.
> Okay. if i do it in add_edge_h, too it should work, shouldn't it? i'm
> only not sure at the moment where the direct connection information is
> stored, and i should set up a few test-vms to test a whole net next.
You really should handle this in all edge related functions.
> diff -Nur tinc-1.0.13/src/protocol_edge.c tinc-1.0.13-patched/src/protocol_edge.c
> --- tinc-1.0.13/src/protocol_edge.c 2010-03-13 18:53:33.000000000 +0100
> +++ tinc-1.0.13-patched/src/protocol_edge.c 2010-09-20 15:32:02.602441373 +0200
> @@ -109,7 +115,14 @@
>
> /* Convert addresses */
>
> - address = str2sockaddr(to_address, to_port);
> + if(foaf){
> + char *host=xstrdup("0.0.0.0");
> + char *port=xstrdup("0");
> + address = str2sockaddr(host, port);
> + free(host);free(port);
> + }else{
> + address = str2sockaddr(to_address, to_port);
> + }
You don't need the xstrdup() and free() here of course. Also, you only modify
the locally stored address and port to 0.0.0.0:0. But the request gets
forwarded later on (line 155) with the original address and port.
--
Met vriendelijke groet / with kind regards,
Guus Sliepen <guus at tinc-vpn.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc-devel/attachments/20100920/f9f784dd/attachment.pgp>
More information about the tinc-devel
mailing list