Mailing List Archive

[PATCH v3 1/5] lib: declare BGP_VRF_NODE as vty subnode
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 ab46fc4a6d11..f0ddc622aaf4 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2627,6 +2627,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:
@@ -3002,6 +3003,7 @@ DEFUN (config_exit,
case BGP_ENCAPV6_NODE:
case BGP_IPV6_NODE:
case BGP_IPV6M_NODE:
+ case BGP_VRF_NODE:
vty->node = BGP_NODE;
break;
case KEYCHAIN_KEY_NODE:
@@ -3050,6 +3052,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 cc5dd0891630..f2a80b0c5122 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -90,6 +90,7 @@ enum node_type
BGP_IPV6M_NODE, /* BGP IPv6 multicast address family. */
BGP_ENCAP_NODE, /* BGP ENCAP SAFI */
BGP_ENCAPV6_NODE, /* BGP ENCAP SAFI */
+ BGP_VRF_NODE, /* BGP VRF node. */
OSPF_NODE, /* OSPF protocol mode */
OSPF6_NODE, /* OSPF protocol for IPv6 mode */
ISIS_NODE, /* ISIS protocol mode */
diff --git a/lib/vty.c b/lib/vty.c
index 7ba277fd8a88..64fe7cacfe40 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -746,6 +746,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


_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev