]> 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>
Thu, 31 Aug 2017 23:39:53 +0000 (23:39 +0000)
Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
bgpd/bgp_clist.c

index 162ea59a069eb7f3ffe645c2d30581f9dae3a969..48fc8474dbad0a7a24e581fef42df422cf07fab1 100644 (file)
@@ -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) {