]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib, zebra: Preserve user-configured VRF on netns deletion 9277/head
authorXiao Liang <shaw.leon@gmail.com>
Fri, 30 Jul 2021 05:00:06 +0000 (13:00 +0800)
committermergify-bot <noreply@mergify.io>
Tue, 3 Aug 2021 20:53:48 +0000 (20:53 +0000)
Don't clear VRF's user-configured flag when netns is deleted.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
(cherry picked from commit 6910315f6f3ddd66d8929cb82deaf96d13a2bfbf)

lib/vrf.c
zebra/zebra_netns_notify.c

index 03d9a62c0f138b6b5fbde171e42268d83cd09408..815c0fcba26526921f9be6f48f2c3d7c039fc881 100644 (file)
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -287,6 +287,7 @@ void vrf_delete(struct vrf *vrf)
                        RB_REMOVE(vrf_id_head, &vrfs_by_id, vrf);
                        vrf->vrf_id = VRF_UNKNOWN;
                }
+               vrf->ns_ctxt = NULL;
                return;
        }
 
index 3e89df68fdc9d44a5cfe8073670d7966dcdb2370..054015846f478dadb460262cc4e3f65470cea34c 100644 (file)
@@ -149,8 +149,6 @@ static int zebra_ns_delete(char *name)
                          "NS notify : no VRF found using NS %s", name);
                return 0;
        }
-       /* Clear configured flag and invoke delete. */
-       UNSET_FLAG(vrf->status, VRF_CONFIGURED);
        ns = (struct ns *)vrf->ns_ctxt;
        /* the deletion order is the same
         * as the one used when siging signal is received