diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-06 19:20:38 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-07-12 21:23:18 +0200 |
commit | aadc0905054edac0fe88b35ae29236875d586cd8 (patch) | |
tree | 71c405efd33d784450ef4d8010c0aafbe5b63751 /bgpd/bgp_snmp.c | |
parent | lib: Fix some defines for older platforms (diff) | |
download | frr-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_snmp.c')
-rw-r--r-- | bgpd/bgp_snmp.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c index db69400a6..c1a6ad589 100644 --- a/bgpd/bgp_snmp.c +++ b/bgpd/bgp_snmp.c @@ -802,16 +802,10 @@ bgp4PathAttrTable (struct variable *v, oid name[], size_t *length, return SNMP_INTEGER (1); break; case BGP4PATHATTRAGGREGATORAS: /* 10 */ - if (binfo->attr->extra) - return SNMP_INTEGER (binfo->attr->extra->aggregator_as); - else - return SNMP_INTEGER (0); + return SNMP_INTEGER (binfo->attr->aggregator_as); break; case BGP4PATHATTRAGGREGATORADDR: /* 11 */ - if (binfo->attr->extra) - return SNMP_IPADDRESS (binfo->attr->extra->aggregator_addr); - else - return SNMP_INTEGER (0); + return SNMP_IPADDRESS (binfo->attr->aggregator_addr); break; case BGP4PATHATTRCALCLOCALPREF: /* 12 */ return SNMP_INTEGER (-1); |