diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-06-21 18:04:46 +0300 | 
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-06-21 18:04:46 +0300 | 
| commit | f5eef2d5a8a471fe6e4ec4f6acfa3dbf190eda5d (patch) | |
| tree | 58ed00dffe8ba1f1c64ca0b6dfa3153da9ec6e43 /nhrpd | |
| parent | cd551a0fd5430791ce4e650ccca9b312f02b9701 (diff) | |
lib: remove vrf-interface config when removing the VRF
If we have the following configuration:
```
vrf red
 smth
 exit-vrf
!
interface red vrf red
 smth
```
And we delete the VRF using "no vrf red" command, we end up with:
```
interface red
 smth
```
Interface config is preserved but moved to the default VRF.
This is not an expected behavior. We should remove the interface config
when the VRF is deleted.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'nhrpd')
| -rw-r--r-- | nhrpd/nhrp_main.c | 1 | ||||
| -rw-r--r-- | nhrpd/nhrp_vty.c | 2 | 
2 files changed, 3 insertions, 0 deletions
diff --git a/nhrpd/nhrp_main.c b/nhrpd/nhrp_main.c index c2111a7706..54b7850207 100644 --- a/nhrpd/nhrp_main.c +++ b/nhrpd/nhrp_main.c @@ -118,6 +118,7 @@ static struct quagga_signal_t sighandlers[] = {  static const struct frr_yang_module_info *const nhrpd_yang_modules[] = {  	&frr_filter_info,  	&frr_interface_info, +	&frr_vrf_info,  };  FRR_DAEMON_INFO(nhrpd, NHRP, .vty_port = NHRP_VTY_PORT, diff --git a/nhrpd/nhrp_vty.c b/nhrpd/nhrp_vty.c index 420ea12ec1..963fa4d995 100644 --- a/nhrpd/nhrp_vty.c +++ b/nhrpd/nhrp_vty.c @@ -1260,6 +1260,8 @@ void nhrp_config_init(void)  	install_element(CONFIG_NODE, &nhrp_multicast_nflog_group_cmd);  	install_element(CONFIG_NODE, &no_nhrp_multicast_nflog_group_cmd); +	vrf_cmd_init(NULL, &nhrpd_privs); +  	/* interface specific commands */  	install_node(&nhrp_interface_node);  | 
