mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 06:53:03 +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-vrf",
|
||||||
"Exit current mode and down to previous mode\n")
|
"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);
|
cmd_exit(vty);
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -192,8 +192,13 @@ struct zebra_vrf {
|
|||||||
* special macro to allow us to get the correct zebra_vrf
|
* special macro to allow us to get the correct zebra_vrf
|
||||||
*/
|
*/
|
||||||
#define ZEBRA_DECLVAR_CONTEXT(A, B) \
|
#define ZEBRA_DECLVAR_CONTEXT(A, B) \
|
||||||
struct vrf *A = VTY_GET_CONTEXT(vrf); \
|
struct vrf *A; \
|
||||||
struct zebra_vrf *B = (A) ? A->info : vrf_info_lookup(VRF_DEFAULT)
|
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)
|
static inline vrf_id_t zvrf_id(struct zebra_vrf *zvrf)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user