From: Emanuele Di Pascale Date: Thu, 7 Jan 2021 14:23:44 +0000 (+0100) Subject: bgpd: fix removal of rd vpn export X-Git-Tag: base_7.6~62^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F7830%2Fhead;p=mirror%2Ffrr.git 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 --- 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;