Skip to content

Commit

Permalink
drouting: Tolerate a NULL dr_rules.gwlist
Browse files Browse the repository at this point in the history
In build_rt_info(), there is a NULL check anyway:

    if ( dstlst && dstlst[0]!=0 ) {

... so this patch can only do good, by making the code compatible with
even more flavours of the `dr_rules` table.
  • Loading branch information
liviuchircu committed Jan 29, 2021
1 parent 2b455a3 commit a764ea3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/drouting/dr_load.c
Expand Up @@ -627,7 +627,7 @@ rt_data_t* dr_load_routing_info(struct head_db *current_partition,
/* ROUTE_ID column */
check_val( routeid_drr_col, ROW_VALUES(row)+5, DB_STRING, 0, 0);
/* DSTLIST column */
check_val( dstlist_drr_col, ROW_VALUES(row)+6, DB_STRING, 1, 1);
check_val( dstlist_drr_col, ROW_VALUES(row)+6, DB_STRING, 0, 1);
str_vals[STR_VALS_DSTLIST_DRR_COL] =
(char*)VAL_STRING(ROW_VALUES(row)+6);
/* SORT_ALG column */
Expand Down

0 comments on commit a764ea3

Please sign in to comment.