mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 04:26:12 +00:00
Merge pull request #8778 from idryzhov/fix-zebra-vrf
zebra: fix config after exit from vrf
This commit is contained in:
commit
455d14ae31
@ -780,8 +780,6 @@ DEFUN_NOSH(vrf_exit,
|
||||
"exit-vrf",
|
||||
"Exit current mode and down to previous mode\n")
|
||||
{
|
||||
/* We have to set vrf context to default vrf */
|
||||
VTY_PUSH_CONTEXT(VRF_NODE, vrf_get(VRF_DEFAULT, VRF_DEFAULT_NAME));
|
||||
cmd_exit(vty);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
@ -192,8 +192,13 @@ struct zebra_vrf {
|
||||
* special macro to allow us to get the correct zebra_vrf
|
||||
*/
|
||||
#define ZEBRA_DECLVAR_CONTEXT(A, B) \
|
||||
struct vrf *A = VTY_GET_CONTEXT(vrf); \
|
||||
struct zebra_vrf *B = (A) ? A->info : vrf_info_lookup(VRF_DEFAULT)
|
||||
struct vrf *A; \
|
||||
if (vty->node == CONFIG_NODE) \
|
||||
A = vrf_lookup_by_id(VRF_DEFAULT); \
|
||||
else \
|
||||
A = VTY_GET_CONTEXT(vrf); \
|
||||
VTY_CHECK_CONTEXT(A); \
|
||||
struct zebra_vrf *B = A->info
|
||||
|
||||
static inline vrf_id_t zvrf_id(struct zebra_vrf *zvrf)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user