summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-01-04 22:08:10 +0100
committerRenato Westphal <renato@opensourcerouting.org>2019-01-18 19:15:41 +0100
commitae7b826a2338aa1cc61019fa74391da1c3ceb542 (patch)
tree6a2456b96aad0aeb182525e14c865ca9f6ba13dd /vtysh
parentripd: failure to create a socket shouldn't be a fatal error (diff)
downloadfrr-ae7b826a2338aa1cc61019fa74391da1c3ceb542.tar.xz
frr-ae7b826a2338aa1cc61019fa74391da1c3ceb542.zip
ripd: add VRF support
* Turn the "instance" YANG presence-container into a YANG list keyed by the new "vrf" leaf. This is a backward incompatible change but this should be ok for now. * RIP VRF instances can be configured even when the corresponding VRF doesn't exist. And a RIP VRF instance isn't deleted when the corresponding VRF is deleted. For this to work, implement the rip_instance_enable() and rip_instance_disable() functions that are called to enable/disable RIP routing instances when necessary. A RIP routing instance can be enabled only when the corresponding VRF is enabled (this information comes from zebra and depends on the underlying VRF backend). Routing instances are stored in the new rip_instances rb-tree (global variable). * Add a vrf pointer to the rip structure instead of storing vrf_id only. This is much more convenient than using vrf_lookup_by_id() every time we need to get the vrf pointer from the VRF ID. The rip->vrf pointer is updated whenever the VRF enable/disable hooks are called. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/vtysh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 6cf45789d..11be03363 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1519,8 +1519,8 @@ DEFUNSH(VTYSH_KEYS, key, key_cmd, "key (0-2147483647)",
return CMD_SUCCESS;
}
-DEFUNSH(VTYSH_RIPD, router_rip, router_rip_cmd, "router rip",
- ROUTER_STR "RIP\n")
+DEFUNSH(VTYSH_RIPD, router_rip, router_rip_cmd, "router rip [vrf NAME]",
+ ROUTER_STR "RIP\n" VRF_CMD_HELP_STR)
{
vty->node = RIP_NODE;
return CMD_SUCCESS;