]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: fix removal of rd vpn export
authorEmanuele Di Pascale <emanuele@voltanet.io>
Thu, 7 Jan 2021 14:23:44 +0000 (15:23 +0100)
committerEmanuele Di Pascale <emanuele@voltanet.io>
Mon, 11 Jan 2021 09:15:18 +0000 (10:15 +0100)
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 <emanuele@voltanet.io>
bgpd/bgp_nb_config.c

index eb2f70fff13194c50fc2334a524c4e7f18e7f3ab..f6a138ba45c6a8516d40ac5545fe1d02861ff940 100644 (file)
@@ -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;