This new node is to be put under router bgp subnode. On top of this, usual exit and end commands are also taking into account bgp vrf subnode. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> --- lib/command.c | 3 +++ lib/command.h | 1 + lib/vty.c | 1 + 3 files changed, 5 insertions(+) diff --git a/lib/command.c b/lib/command.c index ca0d0c001bad..2ba1e53f6751 100644 --- a/lib/command.c +++ b/lib/command.c @@ -750,6 +750,7 @@ node_parent ( enum node_type node ) case BGP_IPV4M_NODE: case BGP_IPV6_NODE: case BGP_IPV6M_NODE: + case BGP_VRF_NODE: ret = BGP_NODE; break; case KEYCHAIN_KEY_NODE: @@ -1113,6 +1114,7 @@ cmd_exit (struct vty *vty) case BGP_VNC_L2_GROUP_NODE: case BGP_IPV6_NODE: case BGP_IPV6M_NODE: + case BGP_VRF_NODE: vty->node = BGP_NODE; break; case LDP_IPV4_NODE: @@ -1180,6 +1182,7 @@ DEFUN (config_end, case BGP_IPV4M_NODE: case BGP_IPV6_NODE: case BGP_IPV6M_NODE: + case BGP_VRF_NODE: case RMAP_NODE: case OSPF_NODE: case OSPF6_NODE: diff --git a/lib/command.h b/lib/command.h index 1e1698fc7d12..aeda6177aa5c 100644 --- a/lib/command.h +++ b/lib/command.h @@ -103,6 +103,7 @@ enum node_type BGP_VNC_NVE_GROUP_NODE, /* BGP VNC nve group */ BGP_VNC_L2_GROUP_NODE, /* BGP VNC L2 group */ RFP_DEFAULTS_NODE, /* RFP defaults node */ + BGP_VRF_NODE, /* BGP VRF node. */ OSPF_NODE, /* OSPF protocol mode */ OSPF6_NODE, /* OSPF protocol for IPv6 mode */ LDP_NODE, /* LDP protocol mode */ diff --git a/lib/vty.c b/lib/vty.c index d5ecb1db5bf1..d2c9a6af6627 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -749,6 +749,7 @@ vty_end_config (struct vty *vty) case BGP_IPV4M_NODE: case BGP_IPV6_NODE: case BGP_IPV6M_NODE: + case BGP_VRF_NODE: case RMAP_NODE: case OSPF_NODE: case OSPF6_NODE: -- 2.1.4