gateway: also adjust the IPv6 gateway list in olsr_update_gateway_entry
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 13 Dec 2012 12:58:41 +0000 (13:58 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 13 Dec 2012 12:59:30 +0000 (13:59 +0100)
This was forgotten in 4249b3f

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/gateway.c

index 44acb75..2c99600 100644 (file)
@@ -808,6 +808,13 @@ void olsr_update_gateway_entry(union olsr_ip_addr *originator, union olsr_ip_add
     assert(new_gw_in_list);
   }
 
+  new_gw_in_list = olsr_gw_list_find(&gw_list_ipv6, gw);
+  if (new_gw_in_list) {
+    assert(gw_handler);
+    new_gw_in_list = olsr_gw_list_update(&gw_list_ipv6, new_gw_in_list, gw_handler->getcosts(new_gw_in_list->gw));
+    assert(new_gw_in_list);
+  }
+
   /* call update handler */
   assert(gw_handler);
   gw_handler->update(gw);