]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Fixed incorrect large community pointer calculation
authorNigel Kukard <nkukard@lbsd.net>
Wed, 30 Aug 2017 07:35:31 +0000 (07:35 +0000)
committerNigel Kukard <nkukard@lbsd.net>
Sun, 3 Sep 2017 03:53:04 +0000 (03:53 +0000)
Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
bgpd/bgp_clist.c

index 6f8ec61d8afcbee60be682c03b1029db881e017f..2159c09d0838f34d05bd029b6a3a77e7a7ea20aa 100644 (file)
@@ -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) {