diff options
| author | Louis Scalbert <louis.scalbert@6wind.com> | 2025-02-12 12:56:49 +0100 |
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2025-02-27 09:43:55 +0100 |
| commit | 64dba6b488cc9905811477bb9677c8ca2c205f6b (patch) | |
| tree | d9642f49c66c0e4f9aa18b311f527a441a4d6bee | |
| parent | 5bbf45dc563af058ed642007816021cc0dbb4485 (diff) | |
bgpd: fix default instance name when un-hiding
When unconfiguring a default BGP instance with VPN SAFI configurations,
the default BGP structure remains but enters a hidden state. Upon
reconfiguration, the instance name incorrectly appears as "VIEW ?"
instead of "VRF default". And the name_pretty pointer
The name_pretty pointer is replaced by another one with the incorrect
name. This also leads to a memory leak as the previous pointer is not
properly freed.
Do not rewrite the instance name.
Fixes: 4d0e7a49cf ("bgpd: VRF-Lite fix default bgp delete")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit d2ff7e8a2117ad4bc38cec0e48c6b3c11dc49c91)
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| -rw-r--r-- | bgpd/bgpd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index e3911de28a..7b60c4fc17 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -3561,7 +3561,7 @@ peer_init: /* printable name we can use in debug messages */ if (inst_type == BGP_INSTANCE_TYPE_DEFAULT && !hidden) { bgp->name_pretty = XSTRDUP(MTYPE_BGP_NAME, "VRF default"); - } else { + } else if (!hidden) { const char *n; int len; |
