From c576dc6a4f5c62aeeb5e77e41c0f8efbf7f5797f Mon Sep 17 00:00:00 2001 From: Emanuele Di Pascale Date: Thu, 7 Jan 2021 15:23:44 +0100 Subject: [PATCH] bgpd: fix removal of rd vpn export a missing '!' operator meant that correct rd strings were being rejected in the destroy callback, making it impossible to remove once configured. Signed-off-by: Emanuele Di Pascale --- bgpd/bgp_nb_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_nb_config.c b/bgpd/bgp_nb_config.c index eb2f70fff1..f6a138ba45 100644 --- a/bgpd/bgp_nb_config.c +++ b/bgpd/bgp_nb_config.c @@ -9554,7 +9554,7 @@ static int bgp_global_afi_safi_ip_unicast_vpn_config_rd_destroy( bgp = nb_running_get_entry(af_dnode, NULL, true); rd_str = yang_dnode_get_string(args->dnode, NULL); - if (str2prefix_rd(rd_str, &prd)) { + if (!str2prefix_rd(rd_str, &prd)) { snprintf(args->errmsg, args->errmsg_len, "Malformed rd %s \n", rd_str); return NB_ERR_INCONSISTENCY; -- 2.39.5