[Babel-users] Convergence problem

Juliusz Chroboczek Juliusz.Chroboczek at pps.jussieu.fr
Thu Jul 3 15:23:03 UTC 2008


> The issue is that your implementation of ppp switches link-local
> addresses on every up/down event.  IPv6 link-local addresses are
> supposed to remain stable, so this is why Babel gets confused by this
> case.  I'll implement a workaround, but you really should try to
> ensure that your link-local addresses remain stable if possible.

Please try the attached patch, and let me know if it fixes your issue.

                                        Juliusz

Thu Jul  3 17:21:04 CEST 2008  Juliusz Chroboczek <jch at pps.jussieu.fr>
  * Protect against duplicate neighbours.
diff -rN -u old-babel/neighbour.c new-babel/neighbour.c
--- old-babel/neighbour.c       2008-07-03 17:21:33.000000000 +0200
+++ new-babel/neighbour.c       2008-07-03 17:21:33.000000000 +0200
@@ -48,6 +48,17 @@
     return NULL;
 }
 
+struct neighbour *
+find_neighbour_by_id(const unsigned char *id, struct network *net)
+{
+    struct neighbour *neigh;
+    FOR_ALL_NEIGHBOURS(neigh) {
+        if(memcmp(id, neigh->id, 16) == 0 && neigh->network == net)
+            return neigh;
+    }
+    return NULL;
+}
+
 void
 flush_neighbour(struct neighbour *neigh)
 {
@@ -84,6 +95,22 @@
             neigh = NULL;
         }
     }
+
+    neigh = find_neighbour_by_id(id, net);
+    if(neigh) {
+        if((neigh->reach & 0xE000) == 0) {
+            /* The other neighbour is probably obsolete. */
+            flush_neighbour(neigh);
+            neigh = NULL;
+        } else {
+            fprintf(stderr, "Duplicate neighbour %s (%s and %s)!\n",
+                    format_address(id),
+                    format_address(neigh->address),
+                    format_address(address));
+            return NULL;
+        }
+    }
+
     debugf("Creating neighbour %s (%s).\n",
            format_address(id), format_address(address));
 



More information about the Babel-users mailing list