bugfix: delete all link entries matching a given IP address.
authorSven-Ola Tuecke <sven-ola@gmx.de>
Tue, 9 Dec 2008 08:08:25 +0000 (09:08 +0100)
committerSven-Ola Tuecke <sven-ola@gmx.de>
Tue, 9 Dec 2008 08:08:25 +0000 (09:08 +0100)
when an interface goes down we need to flush *all* link entries
with the local IP address and not just the first one.
From hannes, trunk(71c35e16799d)

src/link_set.c

index 182c475..1feaf01 100644 (file)
@@ -353,6 +353,9 @@ olsr_delete_link_entry(struct link_entry *link)
   changes_neighborhood = true;
 }
 
+/**
+ * Delete all link entries matching a given interface address.
+ */
 void
 olsr_delete_link_entry_by_ip(const union olsr_ip_addr *int_addr)
 {
@@ -365,7 +368,6 @@ olsr_delete_link_entry_by_ip(const union olsr_ip_addr *int_addr)
   OLSR_FOR_ALL_LINK_ENTRIES(link) {
     if (ipequal(int_addr, &link->local_iface_addr)) {
       olsr_delete_link_entry(link);
-      break;
     }
   }
   OLSR_FOR_ALL_LINK_ENTRIES_END(link);