]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/rfapi/rfapi_import.c
*: conform with COMMUNITY.md formatting rules, via 'make indent'
[mirror_frr.git] / bgpd / rfapi / rfapi_import.c
index 8727c5d5ea5c20a1bb1eae186387df7ffd2935af..c7d64bf1edecb24efb780e66cf30785675ecf856 100644 (file)
@@ -521,7 +521,7 @@ static struct bgp_info *rfapiBgpInfoCreate(struct attr *attr, struct peer *peer,
                rfapi_time(&new->extra->vnc.import.create_time);
        }
        if (label)
-               encode_label(*label, &new->extra->label);
+               encode_label(*label, &new->extra->label[0]);
        new->type = type;
        new->sub_type = sub_type;
        new->peer = peer;
@@ -1083,9 +1083,8 @@ int rfapiEcommunityGetEthernetTag(struct ecommunity *ecom, uint16_t *tag_id)
                                } else if (encode == ECOMMUNITY_ENCODE_AS) {
                                        as = (*p++ << 8);
                                        as |= (*p++);
-                                       p +=
-                                               2; /* skip next two, tag/vid
-                                                     always in lowest bytes */
+                                       p += 2; /* skip next two, tag/vid
+                                                  always in lowest bytes */
                                }
                                if (as == bgp->as) {
                                        *tag_id = *p++ << 8;
@@ -1221,8 +1220,7 @@ static int rfapiVpnBiSamePtUn(struct bgp_info *bi1, struct bgp_info *bi2)
 
        switch (pfx_un1.family) {
        case AF_INET:
-               if (!IPV4_ADDR_SAME(&pfx_un1.u.prefix4,
-                                   &pfx_un2.u.prefix4))
+               if (!IPV4_ADDR_SAME(&pfx_un1.u.prefix4, &pfx_un2.u.prefix4))
                        return 0;
                break;
        case AF_INET6:
@@ -1338,7 +1336,7 @@ rfapiRouteInfo2NextHopEntry(struct rfapi_ip_prefix *rprefix,
                vo->v.l2addr.local_nve_id = bi->extra->vnc.import.rd.val[1];
 
                /* label comes from MP_REACH_NLRI label */
-               vo->v.l2addr.label = decode_label(&bi->extra->label);
+               vo->v.l2addr.label = decode_label(&bi->extra->label[0]);
 
                new->vn_options = vo;
 
@@ -2235,9 +2233,9 @@ static struct bgp_info *rfapiItBiIndexSearch(
 
                                vnc_zlog_debug_verbose(
                                        "%s: bi has prd=%s, peer=%p", __func__,
-                                       prefix_rd2str(&bi_result->extra->vnc.import.rd,
-                                                     buf,
-                                                     sizeof(buf)),
+                                       prefix_rd2str(&bi_result->extra->vnc
+                                                              .import.rd,
+                                                     buf, sizeof(buf)),
                                        bi_result->peer);
                        }
 #endif
@@ -4242,7 +4240,7 @@ static void rfapiBgpTableFilteredImport(struct bgp *bgp,
 
                                        if (bi->extra)
                                                label = decode_label(
-                                                       &bi->extra->label);
+                                                       &bi->extra->label[0]);
                                        (*rfapiBgpInfoFilteredImportFunction(
                                                safi))(
                                                it, /* which import table */