diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-06 13:20:38 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-07-12 15:23:18 -0400 |
| commit | aadc0905054edac0fe88b35ae29236875d586cd8 (patch) | |
| tree | 71c405efd33d784450ef4d8010c0aafbe5b63751 /bgpd/rfapi/rfapi_rib.c | |
| parent | d5424e5356955e543cb31243f69e38cf68e05a33 (diff) | |
bgpd: Refactor 'struct attr_extra' into 'struct attr'
Most of the attributes in 'struct attr_extra' allow for
the more interesting cases of using bgp. The extra
overhead of managing it will induce errors as we add
more attributes and the extra memory overhead is
negligible on anything but full bgp feeds.
Additionally this greatly simplifies the code for
the handling of data.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd: Fix missing label set
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd/rfapi/rfapi_rib.c')
| -rw-r--r-- | bgpd/rfapi/rfapi_rib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bgpd/rfapi/rfapi_rib.c b/bgpd/rfapi/rfapi_rib.c index 5c3976a0c1..563c862381 100644 --- a/bgpd/rfapi/rfapi_rib.c +++ b/bgpd/rfapi/rfapi_rib.c @@ -664,7 +664,7 @@ rfapiRibBi2Ri( ri->lifetime = lifetime; /* This loop based on rfapiRouteInfo2NextHopEntry() */ - for (pEncap = bi->attr->extra->vnc_subtlvs; pEncap; pEncap = pEncap->next) + for (pEncap = bi->attr->vnc_subtlvs; pEncap; pEncap = pEncap->next) { struct bgp_tea_options *hop; @@ -723,11 +723,11 @@ rfapiRibBi2Ri( memcpy (&vo->v.l2addr.macaddr, bi->extra->vnc.import.rd.val+2, ETHER_ADDR_LEN); - if (bi->attr && bi->attr->extra) + if (bi->attr) { - (void) rfapiEcommunityGetLNI (bi->attr->extra->ecommunity, + (void) rfapiEcommunityGetLNI (bi->attr->ecommunity, &vo->v.l2addr.logical_net_id); - (void) rfapiEcommunityGetEthernetTag (bi->attr->extra->ecommunity, + (void) rfapiEcommunityGetEthernetTag (bi->attr->ecommunity, &vo->v.l2addr.tag_id); } |
