From: Nigel Kukard Date: Wed, 30 Aug 2017 07:35:31 +0000 (+0000) Subject: bgpd: Fixed incorrect large community pointer calculation X-Git-Tag: frr-4.0-dev~348^2~5 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=534fc1957bd5f2d4985a2633540eed3182bb8ef9;p=mirror%2Ffrr.git bgpd: Fixed incorrect large community pointer calculation Signed-off-by: Nigel Kukard --- diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c index 162ea59a06..48fc8474db 100644 --- a/bgpd/bgp_clist.c +++ b/bgpd/bgp_clist.c @@ -907,9 +907,8 @@ struct lcommunity *lcommunity_list_match_delete(struct lcommunity *lcom, * community-list. If we need to delete a community value add its index * to com_index_to_delete. */ - ptr = lcom->val; for (i = 0; i < lcom->size; i++) { - ptr += (i * LCOMMUNITY_SIZE); + ptr = lcom->val + (i * LCOMMUNITY_SIZE); for (entry = list->head; entry; entry = entry->next) { if (entry->any) { if (entry->direct == COMMUNITY_PERMIT) {