From f32f3ae5c91a66b0c4070d7094a3ae92aadb72fd Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Fri, 29 Nov 2019 11:57:29 +0100 Subject: [PATCH] bgpd: support redirect import more than one route-target ipv6 the fix consists in parsing the ext community list ipv6 by taking account the size of the ecommunity val size. Signed-off-by: Philippe Guibert --- bgpd/bgp_ecommunity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c index 1e95d401aa..5a053a7f34 100644 --- a/bgpd/bgp_ecommunity.c +++ b/bgpd/bgp_ecommunity.c @@ -934,7 +934,7 @@ char *ecommunity_ecom2str(struct ecommunity *ecom, int format, int filter) strlcat(str_buf, " ", str_size); /* Retrieve value field */ - pnt = ecom->val + (i * 8); + pnt = ecom->val + (i * ecom->unit_size); /* High-order octet is the type */ type = *pnt++; -- 2.39.5