From e43fd05ba896ad5b4ac390f6097d6e6a06308f28 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Wed, 29 Mar 2017 14:42:37 +0200 Subject: ipcpd: normal: Make graph undirected This turns the directed graph into an undirected one. Only one side of the flow creates an FSDB entry. The graph structure creates an edge object for every vertex involved when an edge is updated or removed. --- src/ipcpd/normal/routing.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ipcpd/normal/routing.c') diff --git a/src/ipcpd/normal/routing.c b/src/ipcpd/normal/routing.c index bf736311..bd41b489 100644 --- a/src/ipcpd/normal/routing.c +++ b/src/ipcpd/normal/routing.c @@ -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); -- cgit v1.2.3