From: Donatas Abraitis Date: Mon, 25 Jan 2021 07:51:22 +0000 (+0200) Subject: bgpd: Assert that community_str2com("no-export") always returns non-NULL X-Git-Tag: base_8.0~477^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F7922%2Fhead;p=mirror%2Ffrr.git bgpd: Assert that community_str2com("no-export") always returns non-NULL community_str2com("no-export"); returns ALWAYS non-NULL. If NULL returned here, we really have a bigger problems in the call path. Signed-off-by: Donatas Abraitis --- diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index f7945ce140..e6276d060e 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -3516,6 +3516,8 @@ static void bgp_attr_add_no_export_community(struct attr *attr) old = attr->community; no_export = community_str2com("no-export"); + assert(no_export); + if (old) { merge = community_merge(community_dup(old), no_export);