]> git.meshlink.io Git - meshlink/blobdiff - src/route.c
Get rid of routing_mode.
[meshlink] / src / route.c
index 317d120f568f9209d8ca28c7ae82c237af110e62..764d9b82ca309a78bc54d750f3a46e55f2187275 100644 (file)
@@ -25,7 +25,6 @@
 #include "utils.h"
 #include "libmeshlink.h"
 
-rmode_t routing_mode = RMODE_ROUTER;
 fmode_t forwarding_mode = FMODE_INTERNAL;
 bmode_t broadcast_mode = BMODE_MST;
 bool decrement_ttl = false;
@@ -66,6 +65,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 +74,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;
     }