]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Reconfiguring netns for vrf is not a failure
authorXiao Liang <shaw.leon@gmail.com>
Wed, 7 Sep 2022 09:14:02 +0000 (17:14 +0800)
committerXiao Liang <shaw.leon@gmail.com>
Wed, 7 Sep 2022 09:52:09 +0000 (17:52 +0800)
When using namespace VRF backend, and frr.conf contains:

    vrf test
      netns /run/netns/test
    exit-vrf

FRR fails to start:

    line 11: Failure to communicate[13] to zebra, line:  netns /run/netns/test

Fix this by returning CMD_WARNING rather than CMD_WARNING_CONFIG_FAILED
when the same netns path is configured.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
zebra/zebra_vrf.c

index 6624f0beb993913543ed8645fd47e73e9ac571b7..a2844ca9568f69fb775083c6d36a204ffc8bf4c6 100644 (file)
@@ -595,7 +595,7 @@ int zebra_vrf_netns_handler_create(struct vty *vty, struct vrf *vrf,
                                zlog_info(
                                        "VRF %u already configured with NETNS %s",
                                        vrf->vrf_id, ns->name);
-                       return CMD_WARNING_CONFIG_FAILED;
+                       return CMD_WARNING;
                }
        }
        ns = ns_lookup_name(pathname);