summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_label.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-06-06 19:20:38 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-07-12 21:23:18 +0200
commitaadc0905054edac0fe88b35ae29236875d586cd8 (patch)
tree71c405efd33d784450ef4d8010c0aafbe5b63751 /bgpd/bgp_label.c
parentlib: Fix some defines for older platforms (diff)
downloadfrr-aadc0905054edac0fe88b35ae29236875d586cd8.tar.xz
frr-aadc0905054edac0fe88b35ae29236875d586cd8.zip
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/bgp_label.c')
-rw-r--r--bgpd/bgp_label.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/bgpd/bgp_label.c b/bgpd/bgp_label.c
index fc0654f18..27533a581 100644
--- a/bgpd/bgp_label.c
+++ b/bgpd/bgp_label.c
@@ -151,12 +151,10 @@ bgp_reg_dereg_for_label (struct bgp_node *rn, struct bgp_info *ri,
assert (ri);
if (ri->attr->flag & ATTR_FLAG_BIT (BGP_ATTR_PREFIX_SID))
{
- assert (ri->attr->extra);
-
- if (ri->attr->extra->label_index != BGP_INVALID_LABEL_INDEX)
+ if (ri->attr->label_index != BGP_INVALID_LABEL_INDEX)
{
flags |= ZEBRA_FEC_REGISTER_LABEL_INDEX;
- stream_putl (s, ri->attr->extra->label_index);
+ stream_putl (s, ri->attr->label_index);
}
}
SET_FLAG (rn->flags, BGP_NODE_REGISTERED_FOR_LABEL);