diff options
author | Sander Vrijders <[email protected]> | 2017-03-29 14:42:37 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2017-03-29 14:42:37 +0200 |
commit | e43fd05ba896ad5b4ac390f6097d6e6a06308f28 (patch) | |
tree | 326d07c63210916306825b40407116018a6b6bad /src/ipcpd/normal/routing.c | |
parent | 9097a5446c31b83ec224b3e1403a319b24025346 (diff) | |
download | ouroboros-e43fd05ba896ad5b4ac390f6097d6e6a06308f28.tar.gz ouroboros-e43fd05ba896ad5b4ac390f6097d6e6a06308f28.zip |
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.
Diffstat (limited to 'src/ipcpd/normal/routing.c')
-rw-r--r-- | src/ipcpd/normal/routing.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |