]> git.meshlink.io Git - meshlink/commitdiff
Debug messages in route function
authorSaverio Proto <zioproto@gmail.com>
Thu, 17 Apr 2014 17:53:41 +0000 (19:53 +0200)
committerSaverio Proto <zioproto@gmail.com>
Thu, 17 Apr 2014 17:53:41 +0000 (19:53 +0200)
src/route.c

index 317d120f568f9209d8ca28c7ae82c237af110e62..cffb7d25ab491cf6c31590e6570a826de75afc1c 100644 (file)
@@ -66,6 +66,7 @@ void route(node_t *source,vpn_packet_t *packet) {
     node_t* via = NULL;
     tincpackethdr* hdr = (tincpackethdr*)packet->data;
     owner = lookup_node(hdr->destination);
+    logger(DEBUG_TRAFFIC, LOG_WARNING, "Routing packet from: %s . To: %s \n",hdr->source,hdr->destination);
 
     //Check Lenght
     if(!checklength(source, packet, (sizeof(tincpackethdr))))
@@ -74,6 +75,7 @@ void route(node_t *source,vpn_packet_t *packet) {
     if (owner == NULL) {
     //Lookup failed
     logger(DEBUG_TRAFFIC, LOG_WARNING, "Cant lookup the owner of a packet in the route() function. This should never happen \n");
+    logger(DEBUG_TRAFFIC, LOG_WARNING, "Destination was: %s \n",hdr->destination);
     return;
     }