[OpenSIPS-Devel] [OpenSIPS/opensips] 57e8a6: clusterer: Fix some startup corner-cases (crashes)

Liviu Chircu noreply at github.com
Thu Jul 2 07:42:33 EST 2020


  Branch: refs/heads/2.4
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 57e8a60b214d88165491c5979f4bd304756207b3
      https://github.com/OpenSIPS/opensips/commit/57e8a60b214d88165491c5979f4bd304756207b3
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-02 (Thu, 02 Jul 2020)

  Changed paths:
    M modules/clusterer/clusterer_mod.c
    M modules/clusterer/node_info.c

  Log Message:
  -----------
  clusterer: Fix some startup corner-cases (crashes)

The first extra check fixes a crash in 'db_mode = 0', if only
'neighbor_node_info' is given, so cl->current_node will be NULL.

The second extra check prevents:

(gdb) bt full
0  check_seed_flag (cl_list=<optimized out>) at node_info.c:307
1  load_db_info (dr_dbf=dr_dbf at entry=0x7f2e65996300 <dr_dbf>,
     db_hdl=<optimized out>, db_table=db_table at entry=0x7f2e65993370
     <db_table>, cl_list=<optimized out>) at node_info.c:485
2  mod_init () at clusterer_mod.c:408

Fixes #2086

(cherry picked from commit 0b609f03165ee80f525795f278128162f6418817)





More information about the Devel mailing list