[Olsr-cvs] olsrd-current/src routing_table.c,1.34,1.35

Bernd Petrovitsch (spam-protected)
Wed Nov 14 12:03:54 CET 2007


Update of /cvsroot/olsrd/olsrd-current/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28409/src

Modified Files:
	routing_table.c 
Log Message:
Patch by Hannes Gredler <(spam-protected)> to avoid setting routes
with an invalid impossible netmask.


Index: routing_table.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/routing_table.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** routing_table.c	11 Nov 2007 23:10:24 -0000	1.34
--- routing_table.c	14 Nov 2007 11:03:52 -0000	1.35
***************
*** 404,407 ****
--- 404,414 ----
  
    /*
+    * No bogus prefix lengths.
+    */
+   if (plen > olsr_cnf->maxplen) {
+     return NULL;
+   }
+   
+   /*
     * first check if there is a route_entry for the prefix.
     */
***************
*** 539,543 ****
--- 546,552 ----
    const struct avl_node *rt_tree_node;
  
+ #ifdef DEBUG
    printf("ROUTING TABLE\n");
+ #endif
  
    for (rt_tree_node = avl_walk_first_c(tree);





More information about the Olsr-cvs mailing list