Author: andrews Date: 2008-04-05 14:22:21 +0200 (Sat, 05 Apr 2008) New Revision: 3454
Modified: branches/andrews_n2n_3436/edge.c branches/andrews_n2n_3436/n2n.c branches/andrews_n2n_3436/supernode.c Log: Fix for peer-to-peer registrations. -------- M edge.c Don't register peers for IP=0.0.0.0 or MAC=FF:FF:FF:FF:FF:FF. Tracing of complete peer list. Fix for destination MAC in send_packet2net() - was wrongly using encrypted MAC addresses. Strict peer registration policy only adds a new peer entry on receipt of MSG_TYPE_REGISTER_ACK (not for REGISTER or PACKET). See commentary. Send MSG_TYPE_REGISTRATION_ACK messages both directly and via supernode to allow for triangular symmetric NAT. See commentary. -------- M supernode.c Broadcast each new REGISTER to all registered edge nodes. Re-marshal MSG_TYPE_PACKET packets so header changes take effect. -------- M n2n.c Modified timestamps to millisecond precision. Shortened the text of some long trace messages. -------- Commentary: Triangular communications is the case where one of two edges is behind symmetric NAT. In this case direct peer-to-peer send is possible in one direction, but not the other. To allow for triangular peer-to-peer communications we must only allow direct peer contact to be attempted when we know for certain that packets sent to the public socket of the peer will be allowed (ie. peer is not behind symmetric NAT). To ensure this we only add a direct peer entry only when we receive a MSG_TYPE_REGISTER_ACK. This guarantees that our REGISTER packet was received by the host so we know other packets can be received. If edge B receives a MSG_TYPE_REGISTER from A, then B must send MSG_TYPE_REGISTER_ACK back to A, but if A is behind symmetric NAT it will not receive the ACK, so also send the ACK to the supernode for forwarding. Now A will know that it can send packets directly to B, even if B cannot send packets directlys to A. _______________________________________________ Ntop-dev mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop-dev
