Browse Source
Problem: when two peers connect simultaneously, each incoming INIT_REQUEST(0x02) or INIT_RESPONSE(0x03) triggers etcp_conn_reinit unconditionally, causing endless UP/DOWN flapping loop. Fix: add reset_done flag to ETCP_CONN: - 0 at creation and after explicit reinit (reinit allowed) - set to 1 in etcp_conn_ready (connection stable, block reinit) Three call sites guarded with !conn->reset_done: - client: handle_init_response_client (INIT_RESPONSE 0x03) - server: existing link INIT_REQUEST processing - server: new link INIT_REQUEST processing send_reset logic preserved unconditionally — only etcp_conn_reinit itself is blocked when already stable.topo_upd
3 changed files with 13 additions and 8 deletions
Loading…
Reference in new issue