From: Philippe Guibert Date: Fri, 17 Feb 2017 07:57:37 +0000 (+0100) Subject: bgpd: revert some RT ecom filtering to fix valgrind id'ed error and X-Git-Tag: frr-3.0-branchpoint~29^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=f47195ae584424123915172d18bef2ef8ec6179e;p=matthieu%2Ffrr.git bgpd: revert some RT ecom filtering to fix valgrind id'ed error and potential misreporting. This commits revert the call of ecommunity_ecom2str without filtering. Signed-off-by: Lou Berger --- diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c index 5d4ba78c75..c80966ec6d 100644 --- a/bgpd/bgp_ecommunity.c +++ b/bgpd/bgp_ecommunity.c @@ -213,7 +213,7 @@ ecommunity_intern (struct ecommunity *ecom) find->refcnt++; if (! find->str) - find->str = ecommunity_ecom2str (find, ECOMMUNITY_FORMAT_DISPLAY, ECOMMUNITY_ROUTE_TARGET); + find->str = ecommunity_ecom2str (find, ECOMMUNITY_FORMAT_DISPLAY, 0); return find; } diff --git a/bgpd/rfapi/rfapi.c b/bgpd/rfapi/rfapi.c index 01a033049e..99d26cf13c 100644 --- a/bgpd/rfapi/rfapi.c +++ b/bgpd/rfapi/rfapi.c @@ -1733,7 +1733,7 @@ rfapi_query_inner ( __func__, rfd, buf, ppNextHopEntry); s = ecommunity_ecom2str(rfd->import_table->rt_import_list, - ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); + ECOMMUNITY_FORMAT_ROUTE_MAP, 0); vnc_zlog_debug_verbose("%s rfd->import_table=%p, rfd->import_table->rt_import_list: %s", __func__, rfd->import_table, s); XFREE (MTYPE_ECOMMUNITY_STR, s); } @@ -3809,7 +3809,7 @@ DEFUN (debug_rfapi_show_import, for (it = h->imports; it; it = it->next) { s = ecommunity_ecom2str (it->rt_import_list, - ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); + ECOMMUNITY_FORMAT_ROUTE_MAP, 0); vty_out (vty, "Import Table %p, RTs: %s%s", it, s, VTY_NEWLINE); XFREE (MTYPE_ECOMMUNITY_STR, s); diff --git a/bgpd/rfapi/rfapi_import.c b/bgpd/rfapi/rfapi_import.c index d26d48a559..4a05018d23 100644 --- a/bgpd/rfapi/rfapi_import.c +++ b/bgpd/rfapi/rfapi_import.c @@ -1091,8 +1091,8 @@ rfapiEcommunitiesIntersect (struct ecommunity *e1, struct ecommunity *e2) { char *s1, *s2; - s1 = ecommunity_ecom2str (e1, ECOMMUNITY_FORMAT_DISPLAY, ECOMMUNITY_ROUTE_TARGET); - s2 = ecommunity_ecom2str (e2, ECOMMUNITY_FORMAT_DISPLAY, ECOMMUNITY_ROUTE_TARGET); + s1 = ecommunity_ecom2str (e1, ECOMMUNITY_FORMAT_DISPLAY, 0); + s2 = ecommunity_ecom2str (e2, ECOMMUNITY_FORMAT_DISPLAY, 0); vnc_zlog_debug_verbose ("%s: e1[%s], e2[%s]", __func__, s1, s2); XFREE (MTYPE_ECOMMUNITY_STR, s1); XFREE (MTYPE_ECOMMUNITY_STR, s2); diff --git a/bgpd/rfapi/rfapi_vty.c b/bgpd/rfapi/rfapi_vty.c index 53b38516e6..1f3066b5c5 100644 --- a/bgpd/rfapi/rfapi_vty.c +++ b/bgpd/rfapi/rfapi_vty.c @@ -676,7 +676,7 @@ rfapiPrintBi (void *stream, struct bgp_info *bi) if (bi->attr->extra->ecommunity) { s = ecommunity_ecom2str (bi->attr->extra->ecommunity, - ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); + ECOMMUNITY_FORMAT_ROUTE_MAP, 0); r = snprintf (p, REMAIN, " %s", s); INCP; XFREE (MTYPE_ECOMMUNITY_STR, s); @@ -1433,7 +1433,7 @@ rfapiShowRemoteRegistrationsIt ( } s = ecommunity_ecom2str (it->rt_import_list, - ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); + ECOMMUNITY_FORMAT_ROUTE_MAP, 0); if (pLni) { @@ -1807,7 +1807,7 @@ rfapiPrintDescriptor (struct vty *vty, struct rfapi_descriptor *rfd) { s = ecommunity_ecom2str (rfd->rt_export_list, - ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); + ECOMMUNITY_FORMAT_ROUTE_MAP, 0); vty_out (vty, " Export %s%s", s, HVTY_NEWLINE); XFREE (MTYPE_ECOMMUNITY_STR, s); } @@ -1820,7 +1820,7 @@ rfapiPrintDescriptor (struct vty *vty, struct rfapi_descriptor *rfd) if (rfd->import_table) { s = ecommunity_ecom2str (rfd->import_table->rt_import_list, - ECOMMUNITY_FORMAT_ROUTE_MAP, ECOMMUNITY_ROUTE_TARGET); + ECOMMUNITY_FORMAT_ROUTE_MAP, 0); vty_out (vty, " Import %s%s", s, HVTY_NEWLINE); XFREE (MTYPE_ECOMMUNITY_STR, s); }