[Olsr-dev] ignore UNSPEC_LINK neighbor in lookup_mpr_status(...), too

Peter Tarjan (spam-protected)
Thu Apr 30 16:28:45 CEST 2009


Hi,

> Yep, that would be a typical "bad network design case", where a node with two
> nodes hear a single other node.

I think so, because I found out another piece of code where
UNSPEC_LINK neighbor information should be ignored (and so it won't
override the information to be considered). I have not yet run a
thorough test, but it should do the trick.

--- a/src/process_package.c	2009-04-30 16:18:29.728697453 +0200
+++ b/src/process_package.c	2009-04-30 16:19:22.196697688 +0200
@@ -309,9 +309,9 @@
   struct hello_neighbor *neighbors;

   for (neighbors = message->neighbors; neighbors; neighbors =
neighbors->next) {
-    if (olsr_cnf->ip_version ==
+    if ((olsr_cnf->ip_version ==
         AF_INET ? ip4equal(&neighbors->address.v4,
&in_if->ip_addr.v4) : ip6equal(&neighbors->address.v6,
-
            &in_if->int6_addr.sin6_addr)) {
+
            &in_if->int6_addr.sin6_addr)) && neighbors->link !=
UNSPEC_LINK) {

       if (neighbors->link == SYM_LINK && neighbors->status == MPR_NEIGH) {
         return true;


--
Peter




More information about the Olsr-dev mailing list