diff options
author | Daniel Walton <dwalton@cumulusnetworks.com> | 2015-10-21 00:00:40 +0200 |
---|---|---|
committer | Daniel Walton <dwalton@cumulusnetworks.com> | 2015-10-21 00:00:40 +0200 |
commit | 0b960b4dfad490138a7ad1d6c9bae2caeff01754 (patch) | |
tree | 34f515e6deca2f8559527413fbe3a54528c93852 /vtysh | |
parent | Enable "bgp network import-check exact" by default. Without this it is (diff) | |
download | frr-0b960b4dfad490138a7ad1d6c9bae2caeff01754.tar.xz frr-0b960b4dfad490138a7ad1d6c9bae2caeff01754.zip |
Display the BGP ipv4 unicast configuration under "address-family ipv4 unicast".
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-6739
Before
router bgp 10
bgp router-id 10.1.1.1
bgp log-neighbor-changes
no bgp default ipv4-unicast
network 9.9.9.9/32
neighbor 10.1.1.2 remote-as 10
neighbor 10.1.1.2 shutdown
neighbor 10.1.1.2 update-source lo
neighbor 10.1.1.2 advertisement-interval 1
neighbor 10.1.1.2 timers connect 10
neighbor 10.1.1.2 activate
neighbor 10.1.1.2 next-hop-self
neighbor 10.1.1.2 route-map BAR in
neighbor 10.1.1.2 route-map FOO out
neighbor 20.1.2.2 remote-as 20
neighbor 20.1.2.2 shutdown
neighbor 20.1.2.2 advertisement-interval 1
neighbor 20.1.2.2 timers connect 10
neighbor 20.1.2.2 activate
neighbor 20.1.2.2 route-map HAA in
neighbor 20.1.2.2 route-map BOO out
!
address-family ipv6
network 2001:1:1:1::/64
exit-address-family
!
After
!
router bgp 10
bgp router-id 10.1.1.1
bgp log-neighbor-changes
no bgp default ipv4-unicast
no bgp network import-check
neighbor 10.1.1.2 remote-as 10
neighbor 10.1.1.2 shutdown
neighbor 10.1.1.2 update-source lo
neighbor 10.1.1.2 advertisement-interval 1
neighbor 10.1.1.2 timers connect 10
neighbor 20.1.2.2 remote-as 20
neighbor 20.1.2.2 shutdown
neighbor 20.1.2.2 advertisement-interval 1
neighbor 20.1.2.2 timers connect 10
!
address-family ipv4 unicast
network 9.9.9.9/32
neighbor 10.1.1.2 activate
neighbor 10.1.1.2 next-hop-self
neighbor 10.1.1.2 route-map BAR in
neighbor 10.1.1.2 route-map FOO out
neighbor 20.1.2.2 activate
neighbor 20.1.2.2 route-map HAA in
neighbor 20.1.2.2 route-map BOO out
exit-address-family
!
address-family ipv6 unicast
network 2001:1:1:1::/64
exit-address-family
!
Diffstat (limited to 'vtysh')
-rw-r--r-- | vtysh/vtysh_config.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index 47886ea46..fc0fa351a 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -175,6 +175,8 @@ vtysh_config_parse_line (const char *line) switch (c) { + /* Suppress exclamation points ! and commented lines. The !s are generated + * dynamically in vtysh_config_dump() */ case '!': case '#': break; @@ -188,8 +190,11 @@ vtysh_config_parse_line (const char *line) else if (strncmp (line, " address-family ipv4 multicast", strlen (" address-family ipv4 multicast")) == 0) config = config_get (BGP_IPV4M_NODE, line); - else if (strncmp (line, " address-family ipv6", - strlen (" address-family ipv6")) == 0) + else if (strncmp (line, " address-family ipv4", strlen (" address-family ipv4")) == 0 || + strncmp (line, " address-family ipv4 unicast", strlen (" address-family ipv4 unicast")) == 0) + config = config_get (BGP_IPV4_NODE, line); + else if (strncmp (line, " address-family ipv6", strlen (" address-family ipv6")) == 0 || + strncmp (line, " address-family ipv6 unicast", strlen (" address-family ipv6 unicast")) == 0) config = config_get (BGP_IPV6_NODE, line); else if (config->index == RMAP_NODE || config->index == INTERFACE_NODE || |