summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/routing.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-03-29 16:20:06 +0000
committerdimitri staessens <dimitri.staessens@ugent.be>2017-03-29 16:20:06 +0000
commit489b6be608ce40d5249d95f77815be9b422995d5 (patch)
treee5de4d3cdc559a163455d383fac808080ed2f651 /src/ipcpd/normal/routing.c
parent3bc188d9ee4cc0fd70e5c1bd579f805df3359b60 (diff)
parentd90c66cc6beba511f6bcc48a3ea3fc4e774b5ab8 (diff)
downloadouroboros-489b6be608ce40d5249d95f77815be9b422995d5.tar.gz
ouroboros-489b6be608ce40d5249d95f77815be9b422995d5.zip
Merged in sandervrijders/ouroboros/be-unidirected-graph (pull request #432)
Be unidirected graph
Diffstat (limited to 'src/ipcpd/normal/routing.c')
-rw-r--r--src/ipcpd/normal/routing.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ipcpd/normal/routing.c b/src/ipcpd/normal/routing.c
index bf736311..cc6cdca8 100644
--- a/src/ipcpd/normal/routing.c
+++ b/src/ipcpd/normal/routing.c
@@ -92,7 +92,7 @@ static void * calculate_pff(void * o)
table = NULL;
n_table = graph_routing_table(routing.graph,
ipcpi.dt_addr, &table);
- if (table == NULL) {
+ if (n_table < 0) {
sleep(RECALC_TIME);
continue;
}
@@ -157,6 +157,10 @@ static int routing_neighbor_event(enum nb_event event,
size_t len;
uint8_t * data;
+ /* Only announce the flow if our address is bigger */
+ if (ipcpi.dt_addr < conn.conn_info.addr)
+ return 0;
+
path[0] = '\0';
sprintf(fso_name, "%" PRIu64 "-%" PRIu64,
ipcpi.dt_addr, conn.conn_info.addr);