]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix leaving hidden state
authorLouis Scalbert <louis.scalbert@6wind.com>
Fri, 14 Feb 2025 14:03:00 +0000 (15:03 +0100)
committerLouis Scalbert <louis.scalbert@6wind.com>
Mon, 24 Feb 2025 16:52:43 +0000 (17:52 +0100)
Upon configuration of a VRF instance that references an absent default
VRF with "import vrf default", the default instance is created in hidden
state. However, the default instance is not properly un-hidden when
configured.

Restore the behavior prior to commit below.

Fixes: 9f7177af13 ("bgpd: fix duplicate BGP instance created with unified config")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
bgpd/bgpd.c

index 2d240a01e1196493c1b08a4313233a6c63f77de7..cf1ea78acf32559becf09cbe79cf288d7a9b9a8e 100644 (file)
@@ -3776,7 +3776,7 @@ int bgp_lookup_by_as_name_type(struct bgp **bgp_val, as_t *as, const char *as_pr
                /* Handle AS number change */
                if (bgp->as != *as) {
                        if (hidden || CHECK_FLAG(bgp->vrf_flags, BGP_VRF_AUTO)) {
-                               if (force_config == false && hidden) {
+                               if (hidden) {
                                        bgp_create(as, name, inst_type,
                                                   as_pretty, asnotation, bgp,
                                                   hidden);