From a764ea3e6827b17b8125afb58fa9beabd627022b Mon Sep 17 00:00:00 2001 From: Liviu Chircu Date: Fri, 29 Jan 2021 08:33:30 +0200 Subject: [PATCH] drouting: Tolerate a NULL dr_rules.gwlist 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. --- modules/drouting/dr_load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/drouting/dr_load.c b/modules/drouting/dr_load.c index 507327a4c80..bbeaf796f68 100644 --- a/modules/drouting/dr_load.c +++ b/modules/drouting/dr_load.c @@ -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 */