]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix segfault when re-adding "match evpn default-route" rule 9385/head
authorIgor Ryzhov <iryzhov@nfware.com>
Thu, 12 Aug 2021 16:07:53 +0000 (19:07 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Thu, 12 Aug 2021 16:08:46 +0000 (19:08 +0300)
When using "match evpn default-route" rule, match_arg is NULL and strcmp
is not happy with that. There's already a special function named rulecmp
that handles such situations.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
lib/routemap.c

index 5d45dc10470e141431c2dfa63afb8da871b8e5c1..594dcf97cb8158f21c49d08f54c6cd7dbd7239c7 100644 (file)
@@ -1431,7 +1431,7 @@ enum rmap_compile_rets route_map_add_match(struct route_map_index *index,
                         * the same as the existing configuration then,
                         * ignore the duplicate configuration.
                         */
-                       if (strcmp(match_arg, rule->rule_str) == 0) {
+                       if (rulecmp(match_arg, rule->rule_str) == 0) {
                                if (cmd->func_free)
                                        (*cmd->func_free)(compile);