Skip to content

Commit

Permalink
Fix end detection when inhibition released (#5)
Browse files Browse the repository at this point in the history
When inauguration inhibition is released and the inauguration state is not resent, the runner would not correctly take the result from the parasite TOPOLOGY socket into consideration. This resulted in incorrect end aggregate state detection in some cases.

This PR aims to resolve the above issue by taking into account both the neighbour detection and the TOPOLOGY frame detection from the parasite socket.

Co-authored-by: Daniel Lindqvist <[email protected]>
  • Loading branch information
Daniel-Lindqvist and Daniel Lindqvist authored May 11, 2022
1 parent 3eecdf1 commit 2f1a3d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_INIT([libteam], [1.31-wmo4], [[email protected]])
AC_INIT([libteam], [1.31-wmo5], [[email protected]])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
Expand Down
6 changes: 2 additions & 4 deletions teamd/teamd_runner_ttdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ static uint8_t update_aggregate_state(struct teamd_context *ctx,
memorize_neighbor(ctx, ab);
next = TTDP_AGG_STATE_FIXED_END;
break;
} else if (!end) {
} else if (mid) {
next = TTDP_AGG_STATE_FLOATING_MIDDLE;
forget_neighbor(ctx, ab);
break;
Expand All @@ -443,9 +443,7 @@ static uint8_t update_aggregate_state(struct teamd_context *ctx,
break;
case TTDP_AGG_STATE_FIXED_END:
if (!inhibit) {
/* if a node was discovered while we were gone, we need to become a
* middle node */
if (!is_neighbor_none(&ab->elected_neighbor)) {
if (mid) {
teamd_ttdp_log_infox(ctx->team_devname,
"Inhibit lifted, not end node anymore");
next = TTDP_AGG_STATE_FLOATING_MIDDLE;
Expand Down

0 comments on commit 2f1a3d5

Please sign in to comment.