diff options
Diffstat (limited to 'bgpd/bgp_vty.c')
-rw-r--r-- | bgpd/bgp_vty.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 222e4485..b8af6140 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -10365,8 +10365,9 @@ DEFUN (show_ip_community_list, { struct symbol_table* table; vector extract ; - vector_index i ; + vector_index_t i ; struct symbol* sym ; + struct community_list *list; table = community_list_master_lookup (bgp_clist, COMMUNITY_LIST_MASTER); if (table == NULL) @@ -10375,7 +10376,11 @@ DEFUN (show_ip_community_list, extract = symbol_table_extract(table, NULL, NULL, 0, symbol_mixed_name_cmp) ; for (VECTOR_ITEMS(extract, sym, i)) - community_list_show (vty, symbol_get_value(sym)); + { + list = symbol_get_value(sym) ; + if (list != NULL) + community_list_show (vty, list) ; + } vector_free(extract) ; /* discard temporary vector */ @@ -10719,7 +10724,7 @@ DEFUN (show_ip_extcommunity_list, { struct symbol_table* table; vector extract ; - vector_index i ; + vector_index_t i ; struct symbol* sym ; table = community_list_master_lookup (bgp_clist, EXTCOMMUNITY_LIST_MASTER); @@ -10729,7 +10734,11 @@ DEFUN (show_ip_extcommunity_list, extract = symbol_table_extract(table, NULL, NULL, 0, symbol_mixed_name_cmp) ; for (VECTOR_ITEMS(extract, sym, i)) - extcommunity_list_show (vty, symbol_get_value(sym)); + { + list = symbol_get_value(sym) ; + if (list != NULL) + extcommunity_list_show (vty, list) ; + } vector_free(extract) ; /* discard temporary vector */ @@ -10785,7 +10794,7 @@ community_list_config_write_list(struct vty* vty, int what) struct community_list *list; struct community_entry *entry; vector extract ; - vector_index i ; + vector_index_t i ; struct symbol* sym ; int write = 0; @@ -10796,6 +10805,10 @@ community_list_config_write_list(struct vty* vty, int what) for (VECTOR_ITEMS(extract, sym, i)) { list = symbol_get_value(sym) ; + + if (list == NULL) + continue ; + for (entry = list->head; entry; entry = entry->next) { const char* list_type = "" ; |