Skip to content

Commit

Permalink
Fix a corner case where if the local_node id is higher than the remot…
Browse files Browse the repository at this point in the history
…e node_id and DNS resolution fails opensips would segfault.
  • Loading branch information
tommybrecher committed Sep 18, 2024
1 parent 4d79a71 commit 66c36c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/clusterer/node_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,10 @@ int load_db_info(db_func_t *dr_dbf, db_con_t* db_hdl, str *db_table,
} else if (int_vals[INT_VALS_NODE_ID_COL] == current_id) {
LM_ERR("Invalid info for local node\n");
return -1;
} else if (int_vals[INT_VALS_NODE_ID_COL] == current_id && rc == 1) {
LM_ERR("Invalid info for remote node, this will segfault! [%d] current_id=%d\n",
int_vals[INT_VALS_NODE_ID_COL], rc);
return -1;
} else {
return 2;
}
Expand Down

0 comments on commit 66c36c3

Please sign in to comment.