Revision: 531
          http://vde.svn.sourceforge.net/vde/?rev=531&view=rev
Author:   danielel
Date:     2012-01-17 12:41:27 +0000 (Tue, 17 Jan 2012)
Log Message:
-----------
olsr: Fixed empty HELLO msg, fixed double-counted root neightbor

Modified Paths:
--------------
    branches/vde-router/vde-2/src/vde_router/vder_arp.c
    branches/vde-router/vde-2/src/vde_router/vder_olsr.c

Modified: branches/vde-router/vde-2/src/vde_router/vder_arp.c
===================================================================
--- branches/vde-router/vde-2/src/vde_router/vder_arp.c 2012-01-17 05:18:53 UTC 
(rev 530)
+++ branches/vde-router/vde-2/src/vde_router/vder_arp.c 2012-01-17 12:41:27 UTC 
(rev 531)
@@ -170,6 +170,9 @@
                node = node->rb_left;
        }
        node = vif->arp_table.rb_node;
+       if (!node)
+               return i;
+       node = node->rb_right;
        while(node) {
                struct vder_arp_entry *entry = rb_entry(node, struct 
vder_arp_entry, rb_node);
                neighbors[i++] = entry->ipaddr;

Modified: branches/vde-router/vde-2/src/vde_router/vder_olsr.c
===================================================================
--- branches/vde-router/vde-2/src/vde_router/vder_olsr.c        2012-01-17 
05:18:53 UTC (rev 530)
+++ branches/vde-router/vde-2/src/vde_router/vder_olsr.c        2012-01-17 
12:41:27 UTC (rev 531)
@@ -155,13 +155,9 @@
                hello->willingness = 0x07;
 
                n_vec_size = vder_arp_get_neighbors(vif, neighbors, 256);
-               if (n_vec_size < 1)
-                       return;
                msg_hello->size = htons(sizeof(struct olsrmsg) +
                        sizeof(struct olsr_hmsg_hello) +  n_vec_size * 
((sizeof(struct olsr_link) + sizeof(struct olsr_neighbor))));
 
-
-               printf("%d neighbors \n", n_vec_size);
                if (n_vec_size > 0) {
                        for (i = 0; i < n_vec_size; i ++) {
                                struct olsr_neighbor *neigh; 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
vde-users mailing list
vde-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vde-users

Reply via email to