]> git.proxmox.com Git - mirror_frr.git/commit - lib/vty.h
lib: fix interface configuration after vrf change
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 16 Jun 2021 11:07:30 +0000 (14:07 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Fri, 18 Jun 2021 00:27:46 +0000 (03:27 +0300)
commit763725cd5e431cb4f4ec385e35b312cc7807163a
tree30a3627d078d50fba5a32a96556f504b061a18d0
parent161b567451593a7a176bc91b5aaafc53a578be75
lib: fix interface configuration after vrf change

This commit fixes the following problem:

- enter the interface node
- move the interface to another VRF
- try to continue configuring the interface

It is not possible to continue configuration because the XPath stored in
the vty doesn't correspond with the actual state of the system anymore.

For example:
```
nfware# conf
nfware(config)# interface enp2s0

<-- move the enp2s0 to a different VRF -->

nfware(config-if)# ip router isis 1
% Failed to get iface dnode in candidate DB
```

To fix the issue, go through all connected vty shells and update the
stored XPath.

Suggested-by: Renato Westphal <renato@opensourcerouting.org>
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
lib/if.c
lib/vty.c
lib/vty.h