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-3.0-rc2~12^2~4 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=0d1b810a71113387c75b10912e25ccabcc579358;p=matthieu%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 6f8ec61d8a..2159c09d08 100644 --- a/bgpd/bgp_clist.c +++ b/bgpd/bgp_clist.c @@ -909,9 +909,8 @@ struct lcommunity *lcommunity_list_match_delete(struct lcommunity *lcom, * 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) {