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 <donatas.abraitis@gmail.com>
This commit is contained in:
Donatas Abraitis 2021-01-25 09:51:22 +02:00
parent a5de4a566d
commit b4efa101a8

View File

@ -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);