[ovs-dev] [PATCH 2/2] route-table: flush addresses list when route table is reset

Thadeu Lima de Souza Cascardo cascardo at redhat.com
Sun Jul 24 16:07:27 UTC 2016


When the route table is reset, the addresses list may be out of date, as we race
for the many netlink socket notifications.

A quick fix for this is flushing the addresses list, before dumping the routes
and gathering source addresses for them.

That way, instead of using invalid source addresses or preventing an entry to be
added because of missing source addresses, repeated tests showed the correct
entry is always added.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo at redhat.com>
---
 lib/route-table.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/route-table.c b/lib/route-table.c
index 58e7f62..21df602 100644
--- a/lib/route-table.c
+++ b/lib/route-table.c
@@ -151,6 +151,7 @@ route_table_reset(void)
     struct ofpbuf request, reply, buf;
 
     route_map_clear();
+    netdev_get_addrs_list_flush();
     route_table_valid = true;
     rt_change_seq++;
 
-- 
2.7.4




More information about the dev mailing list