From a5362f24b4dd48f7203be418c6d66f6edccb8d69 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Tue, 19 Jun 2018 11:38:23 +0200 Subject: ipcpd: Change connection down to flow down The DT component was flagging a connection as down and passing the fd that was down. Of course the other components expect a connection instead of just a fd. Now the connection manager will listen to flow up and down events, and flag the connection up or down if needed. Signed-off-by: Sander Vrijders Signed-off-by: Dimitri Staessens --- src/ipcpd/normal/pol/alternate_pff.c | 2 +- src/ipcpd/normal/pol/link_state.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ipcpd/normal/pol') diff --git a/src/ipcpd/normal/pol/alternate_pff.c b/src/ipcpd/normal/pol/alternate_pff.c index 3cb99d9c..cfe00923 100644 --- a/src/ipcpd/normal/pol/alternate_pff.c +++ b/src/ipcpd/normal/pol/alternate_pff.c @@ -384,7 +384,7 @@ int alternate_flow_state_change(struct pff_i * pff_i, } else { /* Need to switch to a (different) alternate */ if (fds[0] == fd) { - for (i = 0 ; i < len; i++) { + for (i = 1; i < len; i++) { /* Usable alternate */ if (!nhops_down_has(pff_i, fds[i])) { tmp = fds[0]; diff --git a/src/ipcpd/normal/pol/link_state.c b/src/ipcpd/normal/pol/link_state.c index 91c18a9d..c55bff70 100644 --- a/src/ipcpd/normal/pol/link_state.c +++ b/src/ipcpd/normal/pol/link_state.c @@ -785,7 +785,6 @@ static void handle_event(void * self, log_warn("Failed to add mgmt neighbor to LSDB."); break; default: - log_info("Unknown routing event."); break; } } @@ -848,9 +847,11 @@ int link_state_init(enum pol_routing pr) switch (pr) { case ROUTING_LINK_STATE: + log_dbg("Using link state routing policy."); ls.rtable = graph_routing_table; break; case ROUTING_LINK_STATE_LFA: + log_dbg("Using Loop-Free Alternates policy."); ls.rtable = graph_routing_table_lfa; break; default: -- cgit v1.2.3