]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Assert that community_str2com("no-export") always returns non-NULL 7922/head
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Mon, 25 Jan 2021 07:51:22 +0000 (09:51 +0200)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Mon, 25 Jan 2021 07:51:22 +0000 (09:51 +0200)
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>
bgpd/bgp_route.c

index f7945ce140f1ac348c6b57dcadb41fdf439566fa..e6276d060ea889120724fd143bb6b1ba586ccd88 100644 (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);