From 3fb1e6cafed648efebaa527f36b795ad8fe49f31 Mon Sep 17 00:00:00 2001 From: gardners Date: Sat, 14 Apr 2012 04:34:45 +0930 Subject: [PATCH] Fixed a bug in node lookup, and added a duplicate broadcast supression check. --- overlay_route.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/overlay_route.c b/overlay_route.c index 8a428447..38ca34b2 100644 --- a/overlay_route.c +++ b/overlay_route.c @@ -367,6 +367,9 @@ int overlay_get_nexthop(unsigned char *d,unsigned char *nexthop,int *nexthoplen, int *interface) { int i; + + if (overlay_broadcast_drop_check(d)) return WHY("I have sent that broadcast frame before"); + if (!overlay_neighbours) return WHY("I have no neighbours"); overlay_neighbour *neh=overlay_route_get_neighbour_structure(d,0 /* don't create if @@ -438,12 +441,14 @@ overlay_node *overlay_route_find_node(unsigned char *sid,int createP) if (bin_number<0) { WHY("negative bin number"); return NULL; } for(slot=0;slot