From e0a9bb95fc7b211564de71aa564c93e15c6e25e4 Mon Sep 17 00:00:00 2001 From: Logan oos Even <46396513+Logan007@users.noreply.github.com> Date: Mon, 1 Nov 2021 23:31:03 +0545 Subject: [PATCH] differentiated between 'active' and 'standby' in sn-selection-by-mac mode (#887) --- src/sn_selection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sn_selection.c b/src/sn_selection.c index 13c0ff1..1448fa3 100644 --- a/src/sn_selection.c +++ b/src/sn_selection.c @@ -232,7 +232,8 @@ extern char * sn_selection_criterion_str (n2n_edge_t *eee, selection_criterion_s } case SN_SELECTION_STRATEGY_MAC: { - chars = snprintf(out, SN_SELECTION_CRITERION_BUF_SIZE, "%s", (int64_t)peer->selection_criterion > 0 ? "active" : ""); + chars = snprintf(out, SN_SELECTION_CRITERION_BUF_SIZE, "%s", ((int64_t)peer->selection_criterion > 0 ? + ((peer == eee->curr_sn) ? "active" : "standby") : "")); break; }