From 93b9c666177ac8a6e2709f0f17c6c9b4e863c58e Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:00:53 -0400 Subject: [PATCH 1/7] lib: remove BGP_ENCAP(V6)_NODE Signed-off-by: Lou Berger --- lib/command.c | 6 ------ lib/command.h | 2 -- lib/vty.c | 2 -- 3 files changed, 10 deletions(-) diff --git a/lib/command.c b/lib/command.c index ff921ff402..4912461adb 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1047,8 +1047,6 @@ node_parent ( enum node_type node ) { case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: case BGP_VRF_POLICY_NODE: case BGP_VNC_DEFAULTS_NODE: case BGP_VNC_NVE_GROUP_NODE: @@ -1416,8 +1414,6 @@ cmd_exit (struct vty *vty) case BGP_IPV4M_NODE: case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: case BGP_VRF_POLICY_NODE: case BGP_VNC_DEFAULTS_NODE: case BGP_VNC_NVE_GROUP_NODE: @@ -1481,8 +1477,6 @@ DEFUN (config_end, case RIP_NODE: case RIPNG_NODE: case BGP_NODE: - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: case BGP_VRF_POLICY_NODE: case BGP_VNC_DEFAULTS_NODE: case BGP_VNC_NVE_GROUP_NODE: diff --git a/lib/command.h b/lib/command.h index d62f7655ee..223f028144 100644 --- a/lib/command.h +++ b/lib/command.h @@ -98,8 +98,6 @@ enum node_type BGP_IPV4M_NODE, /* BGP IPv4 multicast address family. */ BGP_IPV6_NODE, /* BGP IPv6 address family */ BGP_IPV6M_NODE, /* BGP IPv6 multicast address family. */ - BGP_ENCAP_NODE, /* BGP ENCAP SAFI */ - BGP_ENCAPV6_NODE, /* BGP ENCAP SAFI */ BGP_VRF_POLICY_NODE, /* BGP VRF policy */ BGP_VNC_DEFAULTS_NODE, /* BGP VNC nve defaults */ BGP_VNC_NVE_GROUP_NODE, /* BGP VNC nve group */ diff --git a/lib/vty.c b/lib/vty.c index 36755b1d95..e7e0f17e67 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -737,8 +737,6 @@ vty_end_config (struct vty *vty) case BGP_NODE: case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: case BGP_VRF_POLICY_NODE: case BGP_VNC_DEFAULTS_NODE: case BGP_VNC_NVE_GROUP_NODE: From b61410ebd5b58175caf5a5fea12d585308790a99 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:01:09 -0400 Subject: [PATCH 2/7] vtysh: remove BGP_ENCAP(V6)_NODE Signed-off-by: Lou Berger --- vtysh/vtysh.c | 56 --------------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 337925c6e8..24ac9675e8 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -306,7 +306,6 @@ vtysh_execute_func (const char *line, int pager) if (ret == CMD_SUCCESS || ret == CMD_SUCCESS_DAEMON || ret == CMD_WARNING) { if ((saved_node == BGP_VPNV4_NODE || saved_node == BGP_VPNV6_NODE - || saved_node == BGP_ENCAP_NODE || saved_node == BGP_ENCAPV6_NODE || saved_node == BGP_IPV4_NODE || saved_node == BGP_IPV6_NODE || saved_node == BGP_IPV4M_NODE || saved_node == BGP_IPV6M_NODE || saved_node == BGP_EVPN_NODE) @@ -927,18 +926,6 @@ static struct cmd_node bgp_vpnv6_node = "%s(config-router-af)# " }; -static struct cmd_node bgp_encap_node = -{ - BGP_ENCAP_NODE, - "%s(config-router-af)# " -}; - -static struct cmd_node bgp_encapv6_node = -{ - BGP_ENCAPV6_NODE, - "%s(config-router-af)# " -}; - static struct cmd_node bgp_ipv4_node = { BGP_IPV4_NODE, @@ -1137,31 +1124,6 @@ DEFUNSH (VTYSH_BGPD, return CMD_SUCCESS; } -DEFUNSH (VTYSH_BGPD, - address_family_encapv4, - address_family_encapv4_cmd, - "address-family [ipv4] ", - "Enter Address Family command mode\n" - "Address Family\n" - "Address Family\n" - "Address Family\n") -{ - vty->node = BGP_ENCAP_NODE; - return CMD_SUCCESS; -} - -DEFUNSH (VTYSH_BGPD, - address_family_encapv6, - address_family_encapv6_cmd, - "address-family [ipv6] encapv6", - "Enter Address Family command mode\n" - "Address Family\n" - "Address Family\n") -{ - vty->node = BGP_ENCAPV6_NODE; - return CMD_SUCCESS; -} - DEFUNSH (VTYSH_BGPD, address_family_ipv4, address_family_ipv4_cmd, @@ -1548,8 +1510,6 @@ vtysh_exit (struct vty *vty) break; case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: case BGP_IPV4_NODE: case BGP_IPV4M_NODE: case BGP_IPV6_NODE: @@ -1614,8 +1574,6 @@ DEFUNSH (VTYSH_BGPD, || vty->node == BGP_IPV4M_NODE || vty->node == BGP_VPNV4_NODE || vty->node == BGP_VPNV6_NODE - || vty->node == BGP_ENCAP_NODE - || vty->node == BGP_ENCAPV6_NODE || vty->node == BGP_IPV6_NODE || vty->node == BGP_IPV6M_NODE) vty->node = BGP_NODE; @@ -3140,8 +3098,6 @@ vtysh_init_vty (void) install_node (&zebra_node, NULL); install_node (&bgp_vpnv4_node, NULL); install_node (&bgp_vpnv6_node, NULL); - install_node (&bgp_encap_node, NULL); - install_node (&bgp_encapv6_node, NULL); install_node (&bgp_ipv4_node, NULL); install_node (&bgp_ipv4m_node, NULL); install_node (&bgp_ipv6_node, NULL); @@ -3178,8 +3134,6 @@ vtysh_init_vty (void) vtysh_install_default (ZEBRA_NODE); vtysh_install_default (BGP_VPNV4_NODE); vtysh_install_default (BGP_VPNV6_NODE); - vtysh_install_default (BGP_ENCAP_NODE); - vtysh_install_default (BGP_ENCAPV6_NODE); vtysh_install_default (BGP_IPV4_NODE); vtysh_install_default (BGP_IPV4M_NODE); vtysh_install_default (BGP_IPV6_NODE); @@ -3245,10 +3199,6 @@ vtysh_init_vty (void) install_element (BGP_VPNV4_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_VPNV6_NODE, &vtysh_exit_bgpd_cmd); install_element (BGP_VPNV6_NODE, &vtysh_quit_bgpd_cmd); - install_element (BGP_ENCAP_NODE, &vtysh_exit_bgpd_cmd); - install_element (BGP_ENCAP_NODE, &vtysh_quit_bgpd_cmd); - install_element (BGP_ENCAPV6_NODE, &vtysh_exit_bgpd_cmd); - install_element (BGP_ENCAPV6_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_IPV4_NODE, &vtysh_exit_bgpd_cmd); install_element (BGP_IPV4_NODE, &vtysh_quit_bgpd_cmd); install_element (BGP_IPV4M_NODE, &vtysh_exit_bgpd_cmd); @@ -3298,8 +3248,6 @@ vtysh_init_vty (void) install_element (BGP_IPV4M_NODE, &vtysh_end_all_cmd); install_element (BGP_VPNV4_NODE, &vtysh_end_all_cmd); install_element (BGP_VPNV6_NODE, &vtysh_end_all_cmd); - install_element (BGP_ENCAP_NODE, &vtysh_end_all_cmd); - install_element (BGP_ENCAPV6_NODE, &vtysh_end_all_cmd); install_element (BGP_IPV6_NODE, &vtysh_end_all_cmd); install_element (BGP_IPV6M_NODE, &vtysh_end_all_cmd); install_element (BGP_VRF_POLICY_NODE, &vtysh_end_all_cmd); @@ -3349,8 +3297,6 @@ vtysh_init_vty (void) install_element (CONFIG_NODE, &router_bgp_cmd); install_element (BGP_NODE, &address_family_vpnv4_cmd); install_element (BGP_NODE, &address_family_vpnv6_cmd); - install_element (BGP_NODE, &address_family_encapv4_cmd); - install_element (BGP_NODE, &address_family_encapv6_cmd); #if defined(ENABLE_BGP_VNC) install_element (BGP_NODE, &vnc_vrf_policy_cmd); install_element (BGP_NODE, &vnc_defaults_cmd); @@ -3366,8 +3312,6 @@ vtysh_init_vty (void) install_element (BGP_NODE, &address_family_evpn_cmd); install_element (BGP_VPNV4_NODE, &exit_address_family_cmd); install_element (BGP_VPNV6_NODE, &exit_address_family_cmd); - install_element (BGP_ENCAP_NODE, &exit_address_family_cmd); - install_element (BGP_ENCAPV6_NODE, &exit_address_family_cmd); install_element (BGP_IPV4_NODE, &exit_address_family_cmd); install_element (BGP_IPV4M_NODE, &exit_address_family_cmd); install_element (BGP_IPV6_NODE, &exit_address_family_cmd); From 5f69e7a7acc4418c41c9c4f94cc6bf21f614c103 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:01:54 -0400 Subject: [PATCH 3/7] bgpd: remove support for ipv4|6 encap safi config Signed-off-by: Lou Berger --- bgpd/bgp_encap.c | 77 ------------------------ bgpd/bgp_vty.c | 148 +---------------------------------------------- 2 files changed, 2 insertions(+), 223 deletions(-) diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 8764050b16..977eb5fd4c 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -202,78 +202,6 @@ bgp_nlri_parse_encap( return 0; } - -/* TBD: these routes should probably all be host routes */ - -/* For testing purpose, static route of ENCAP. */ -DEFUN (encap_network, - encap_network_cmd, - "network A.B.C.D/M rd ASN:nn_or_IP-address:nn", - "Specify a network to announce via BGP\n" - "IPv4 prefix\n" - "Specify Route Distinguisher\n" - "ENCAP Route Distinguisher\n") -{ - int idx_ipv4 = 1; - int idx_rd = 3; - return bgp_static_set_safi (AFI_IP, SAFI_ENCAP, vty, argv[idx_ipv4]->arg, argv[idx_rd]->arg, NULL, - NULL, 0, NULL, NULL, NULL, NULL); -} - -/* For testing purpose, static route of ENCAP. */ -DEFUN (no_encap_network, - no_encap_network_cmd, - "no network A.B.C.D/M rd ASN:nn_or_IP-address:nn", - NO_STR - "Specify a network to announce via BGP\n" - "IPv4 prefix\n" - "Specify Route Distinguisher\n" - "ENCAP Route Distinguisher\n" - "BGP tag\n" - "tag value\n") -{ - int idx_ipv4 = 2; - int idx_rd = 4; - return bgp_static_unset_safi (AFI_IP, SAFI_ENCAP, vty, argv[idx_ipv4]->arg, argv[idx_rd]->arg, NULL, - 0, NULL, NULL, NULL); -} - -DEFUN (encapv6_network, - encapv6_network_cmd, - "network X:X::X:X/M rd ASN:nn_or_IP-address:nn [route-map WORD]", - "Specify a network to announce via BGP\n" - "IPv6 prefix /, e.g., 3ffe::/16\n" - "Specify Route Distinguisher\n" - "VPN Route Distinguisher\n" - "route map\n" - "route map name\n") -{ - int idx_ipv6 = 1; - int idx_rd = 3; - int idx_rmap = 5; - const char *rmap_str = (argc == 6) ? argv[idx_rmap]->arg : NULL; - return bgp_static_set_safi (AFI_IP6, SAFI_ENCAP, vty, argv[idx_ipv6]->arg, - argv[idx_rd]->arg, NULL, rmap_str, 0, NULL, - NULL, NULL, NULL); -} - -DEFUN (no_encapv6_network, - no_encapv6_network_cmd, - "no network X:X::X:X/M rd ASN:nn_or_IP-address:nn [route-map WORD]", - NO_STR - "Specify a network to announce via BGP\n" - "IPv6 prefix /, e.g., 3ffe::/16\n" - "Specify Route Distinguisher\n" - "VPN Route Distinguisher\n" - "route map\n" - "route map name\n") -{ - int idx_ipv6 = 2; - int idx_rd = 4; - return bgp_static_unset_safi (AFI_IP6, SAFI_ENCAP, vty, argv[idx_ipv6]->arg, - argv[idx_rd]->arg, NULL, 0, NULL, NULL, NULL); -} - static int show_adj_route_encap (struct vty *vty, struct peer *peer, struct prefix_rd *prd) { @@ -792,11 +720,6 @@ DEFUN (show_bgp_ipv6_encap_rd_neighbor_advertised_routes, void bgp_encap_init (void) { - install_element (BGP_ENCAP_NODE, &encap_network_cmd); - install_element (BGP_ENCAP_NODE, &no_encap_network_cmd); - install_element (BGP_ENCAPV6_NODE, &encapv6_network_cmd); - install_element (BGP_ENCAPV6_NODE, &no_encapv6_network_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_tags_cmd); install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_tags_cmd); diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 1372e820f9..4d00fc963f 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -71,7 +71,6 @@ bgp_node_afi (struct vty *vty) case BGP_IPV6_NODE: case BGP_IPV6M_NODE: case BGP_VPNV6_NODE: - case BGP_ENCAPV6_NODE: afi = AFI_IP6; break; case BGP_EVPN_NODE: @@ -92,10 +91,6 @@ bgp_node_safi (struct vty *vty) safi_t safi; switch (vty->node) { - case BGP_ENCAP_NODE: - case BGP_ENCAPV6_NODE: - safi = SAFI_ENCAP; - break; case BGP_VPNV4_NODE: case BGP_VPNV6_NODE: safi = SAFI_MPLS_VPN; @@ -5656,7 +5651,7 @@ DEFUN (no_neighbor_addpath_tx_bestpath_per_as, DEFUN_NOSH (address_family_ipv4_safi, address_family_ipv4_safi_cmd, - "address-family ipv4 []", + "address-family ipv4 []", "Enter Address Family command mode\n" "Address Family\n" BGP_SAFI_HELP_STR) @@ -5669,9 +5664,6 @@ DEFUN_NOSH (address_family_ipv4_safi, case SAFI_MULTICAST: vty->node = BGP_IPV4M_NODE; break; - case SAFI_ENCAP: - vty->node = BGP_ENCAP_NODE; - break; case SAFI_MPLS_VPN: vty->node = BGP_VPNV4_NODE; break; @@ -5689,7 +5681,7 @@ DEFUN_NOSH (address_family_ipv4_safi, DEFUN_NOSH (address_family_ipv6_safi, address_family_ipv6_safi_cmd, - "address-family ipv6 []", + "address-family ipv6 []", "Enter Address Family command mode\n" "Address Family\n" BGP_SAFI_HELP_STR) @@ -5702,9 +5694,6 @@ DEFUN_NOSH (address_family_ipv6_safi, case SAFI_MULTICAST: vty->node = BGP_IPV6M_NODE; break; - case SAFI_ENCAP: - vty->node = BGP_ENCAPV6_NODE; - break; case SAFI_MPLS_VPN: vty->node = BGP_VPNV6_NODE; break; @@ -5744,28 +5733,6 @@ DEFUN_NOSH (address_family_vpnv6, } #endif -DEFUN_NOSH (address_family_encap, - address_family_encap_cmd, - "address-family ", - "Enter Address Family command mode\n" - "Address Family\n" - "Address Family\n") -{ - vty->node = BGP_ENCAP_NODE; - return CMD_SUCCESS; -} - - -DEFUN_NOSH (address_family_encapv6, - address_family_encapv6_cmd, - "address-family encapv6", - "Enter Address Family command mode\n" - "Address Family\n") -{ - vty->node = BGP_ENCAPV6_NODE; - return CMD_SUCCESS; -} - DEFUN_NOSH (address_family_evpn, address_family_evpn_cmd, "address-family ", @@ -5789,8 +5756,6 @@ DEFUN_NOSH (exit_address_family, || vty->node == BGP_IPV6_NODE || vty->node == BGP_IPV6M_NODE || vty->node == BGP_VPNV6_NODE - || vty->node == BGP_ENCAP_NODE - || vty->node == BGP_ENCAPV6_NODE || vty->node == BGP_EVPN_NODE) vty->node = BGP_NODE; return CMD_SUCCESS; @@ -10094,20 +10059,6 @@ static struct cmd_node bgp_vpnv6_node = 1 }; -static struct cmd_node bgp_encap_node = -{ - BGP_ENCAP_NODE, - "%s(config-router-af-encap)# ", - 1 -}; - -static struct cmd_node bgp_encapv6_node = -{ - BGP_ENCAPV6_NODE, - "%s(config-router-af-encapv6)# ", - 1 -}; - static struct cmd_node bgp_evpn_node = { BGP_EVPN_NODE, @@ -10128,8 +10079,6 @@ bgp_vty_init (void) install_node (&bgp_ipv6_multicast_node, NULL); install_node (&bgp_vpnv4_node, NULL); install_node (&bgp_vpnv6_node, NULL); - install_node (&bgp_encap_node, NULL); - install_node (&bgp_encapv6_node, NULL); install_node (&bgp_evpn_node, NULL); /* Install default VTY commands to new nodes. */ @@ -10140,8 +10089,6 @@ bgp_vty_init (void) install_default (BGP_IPV6M_NODE); install_default (BGP_VPNV4_NODE); install_default (BGP_VPNV6_NODE); - install_default (BGP_ENCAP_NODE); - install_default (BGP_ENCAPV6_NODE); install_default (BGP_EVPN_NODE); /* "bgp multiple-instance" commands. */ @@ -10354,8 +10301,6 @@ bgp_vty_init (void) install_element (BGP_IPV6M_NODE, &neighbor_activate_cmd); install_element (BGP_VPNV4_NODE, &neighbor_activate_cmd); install_element (BGP_VPNV6_NODE, &neighbor_activate_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_activate_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_activate_cmd); install_element (BGP_EVPN_NODE, &neighbor_activate_cmd); /* "no neighbor activate" commands. */ @@ -10366,8 +10311,6 @@ bgp_vty_init (void) install_element (BGP_IPV6M_NODE, &no_neighbor_activate_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_activate_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_activate_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_activate_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_activate_cmd); install_element (BGP_EVPN_NODE, &no_neighbor_activate_cmd); /* "neighbor peer-group" set commands. @@ -10383,8 +10326,6 @@ bgp_vty_init (void) install_element (BGP_IPV6M_NODE, &neighbor_set_peer_group_cmd); install_element (BGP_VPNV4_NODE, &neighbor_set_peer_group_cmd); install_element (BGP_VPNV6_NODE, &neighbor_set_peer_group_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_set_peer_group_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_set_peer_group_cmd); /* "no neighbor peer-group unset" commands. */ install_element (BGP_NODE, &no_neighbor_set_peer_group_cmd); @@ -10394,8 +10335,6 @@ bgp_vty_init (void) install_element (BGP_IPV6M_NODE, &no_neighbor_set_peer_group_cmd); install_element (BGP_VPNV4_NODE, &no_neighbor_set_peer_group_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_set_peer_group_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_set_peer_group_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_set_peer_group_cmd); /* "neighbor softreconfiguration inbound" commands.*/ install_element (BGP_NODE, &neighbor_soft_reconfiguration_cmd); @@ -10412,10 +10351,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_soft_reconfiguration_cmd); install_element (BGP_VPNV6_NODE, &neighbor_soft_reconfiguration_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_soft_reconfiguration_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_soft_reconfiguration_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_soft_reconfiguration_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_soft_reconfiguration_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_soft_reconfiguration_cmd); /* "neighbor attribute-unchanged" commands. */ install_element (BGP_NODE, &neighbor_attr_unchanged_cmd); @@ -10433,12 +10368,6 @@ bgp_vty_init (void) install_element (BGP_VPNV6_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_attr_unchanged_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_attr_unchanged_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_attr_unchanged_cmd); - - install_element (BGP_ENCAPV6_NODE, &neighbor_attr_unchanged_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_attr_unchanged_cmd); - install_element (BGP_EVPN_NODE, &neighbor_attr_unchanged_cmd); install_element (BGP_EVPN_NODE, &no_neighbor_attr_unchanged_cmd); @@ -10461,10 +10390,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_nexthop_self_cmd); install_element (BGP_VPNV6_NODE, &neighbor_nexthop_self_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_nexthop_self_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_nexthop_self_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_nexthop_self_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_nexthop_self_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_nexthop_self_cmd); /* "neighbor next-hop-self force" commands. */ install_element (BGP_NODE, &neighbor_nexthop_self_force_cmd); @@ -10555,10 +10480,6 @@ bgp_vty_init (void) install_element (BGP_VPNV6_NODE, &no_neighbor_remove_private_as_replace_as_cmd); install_element (BGP_VPNV6_NODE, &neighbor_remove_private_as_all_replace_as_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_remove_private_as_all_replace_as_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_remove_private_as_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_remove_private_as_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_remove_private_as_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_remove_private_as_cmd); /* "neighbor send-community" commands.*/ install_element (BGP_NODE, &neighbor_send_community_cmd); @@ -10589,14 +10510,6 @@ bgp_vty_init (void) install_element (BGP_VPNV6_NODE, &neighbor_send_community_type_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_send_community_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_send_community_type_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_send_community_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_send_community_type_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_send_community_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_send_community_type_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_send_community_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_send_community_type_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_send_community_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_send_community_type_cmd); /* "neighbor route-reflector" commands.*/ install_element (BGP_NODE, &neighbor_route_reflector_client_cmd); @@ -10613,10 +10526,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_route_reflector_client_cmd); install_element (BGP_VPNV6_NODE, &neighbor_route_reflector_client_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_route_reflector_client_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_route_reflector_client_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_route_reflector_client_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_route_reflector_client_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_route_reflector_client_cmd); /* "neighbor route-server" commands.*/ install_element (BGP_NODE, &neighbor_route_server_client_cmd); @@ -10633,10 +10542,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_route_server_client_cmd); install_element (BGP_VPNV6_NODE, &neighbor_route_server_client_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_route_server_client_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_route_server_client_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_route_server_client_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_route_server_client_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_route_server_client_cmd); /* "neighbor addpath-tx-all-paths" commands.*/ install_element (BGP_NODE, &neighbor_addpath_tx_all_paths_cmd); @@ -10759,10 +10664,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_weight_cmd); install_element (BGP_VPNV6_NODE, &neighbor_weight_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_weight_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_weight_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_weight_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_weight_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_weight_cmd); /* "neighbor override-capability" commands. */ install_element (BGP_NODE, &neighbor_override_capability_cmd); @@ -10803,10 +10704,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_distribute_list_cmd); install_element (BGP_VPNV6_NODE, &neighbor_distribute_list_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_distribute_list_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_distribute_list_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_distribute_list_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_distribute_list_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_distribute_list_cmd); /* "neighbor prefix-list" commands. */ install_element (BGP_NODE, &neighbor_prefix_list_cmd); @@ -10823,10 +10720,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_prefix_list_cmd); install_element (BGP_VPNV6_NODE, &neighbor_prefix_list_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_prefix_list_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_prefix_list_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_prefix_list_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_prefix_list_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_prefix_list_cmd); /* "neighbor filter-list" commands. */ install_element (BGP_NODE, &neighbor_filter_list_cmd); @@ -10843,10 +10736,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_filter_list_cmd); install_element (BGP_VPNV6_NODE, &neighbor_filter_list_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_filter_list_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_filter_list_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_filter_list_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_filter_list_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_filter_list_cmd); /* "neighbor route-map" commands. */ install_element (BGP_NODE, &neighbor_route_map_cmd); @@ -10863,10 +10752,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_route_map_cmd); install_element (BGP_VPNV6_NODE, &neighbor_route_map_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_route_map_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_route_map_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_route_map_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_route_map_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_route_map_cmd); /* "neighbor unsuppress-map" commands. */ install_element (BGP_NODE, &neighbor_unsuppress_map_cmd); @@ -10883,10 +10768,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_unsuppress_map_cmd); install_element (BGP_VPNV6_NODE, &neighbor_unsuppress_map_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_unsuppress_map_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_unsuppress_map_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_unsuppress_map_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_unsuppress_map_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_unsuppress_map_cmd); /* "neighbor maximum-prefix" commands. */ install_element (BGP_NODE, &neighbor_maximum_prefix_cmd); @@ -10939,22 +10820,6 @@ bgp_vty_init (void) install_element (BGP_VPNV6_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_maximum_prefix_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_threshold_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_warning_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_threshold_warning_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_restart_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_maximum_prefix_cmd); - - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_threshold_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_warning_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_threshold_warning_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_restart_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_maximum_prefix_threshold_restart_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_maximum_prefix_cmd); - /* "neighbor allowas-in" */ install_element (BGP_NODE, &neighbor_allowas_in_cmd); install_element (BGP_NODE, &no_neighbor_allowas_in_cmd); @@ -10970,10 +10835,6 @@ bgp_vty_init (void) install_element (BGP_VPNV4_NODE, &no_neighbor_allowas_in_cmd); install_element (BGP_VPNV6_NODE, &neighbor_allowas_in_cmd); install_element (BGP_VPNV6_NODE, &no_neighbor_allowas_in_cmd); - install_element (BGP_ENCAP_NODE, &neighbor_allowas_in_cmd); - install_element (BGP_ENCAP_NODE, &no_neighbor_allowas_in_cmd); - install_element (BGP_ENCAPV6_NODE, &neighbor_allowas_in_cmd); - install_element (BGP_ENCAPV6_NODE, &no_neighbor_allowas_in_cmd); /* address-family commands. */ install_element (BGP_NODE, &address_family_ipv4_safi_cmd); @@ -10983,9 +10844,6 @@ bgp_vty_init (void) install_element (BGP_NODE, &address_family_vpnv6_cmd); #endif /* KEEP_OLD_VPN_COMMANDS */ - install_element (BGP_NODE, &address_family_encap_cmd); - install_element (BGP_NODE, &address_family_encapv6_cmd); - install_element (BGP_NODE, &address_family_evpn_cmd); /* "exit-address-family" command. */ @@ -10995,8 +10853,6 @@ bgp_vty_init (void) install_element (BGP_IPV6M_NODE, &exit_address_family_cmd); install_element (BGP_VPNV4_NODE, &exit_address_family_cmd); install_element (BGP_VPNV6_NODE, &exit_address_family_cmd); - install_element (BGP_ENCAP_NODE, &exit_address_family_cmd); - install_element (BGP_ENCAPV6_NODE, &exit_address_family_cmd); install_element (BGP_EVPN_NODE, &exit_address_family_cmd); /* "clear ip bgp commands" */ From 3c6ba3ec027027af64440d502fd779401b46a847 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:02:31 -0400 Subject: [PATCH 4/7] bgpd rfapi: remove ability to configure use of encap-safi (continue to use encap attribute) Signed-off-by: Lou Berger --- bgpd/rfapi/bgp_rfapi_cfg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bgpd/rfapi/bgp_rfapi_cfg.c b/bgpd/rfapi/bgp_rfapi_cfg.c index 4f46565900..fe1d272ade 100644 --- a/bgpd/rfapi/bgp_rfapi_cfg.c +++ b/bgpd/rfapi/bgp_rfapi_cfg.c @@ -291,10 +291,9 @@ bgp_rfapi_is_vnc_configured (struct bgp *bgp) DEFUN (vnc_advertise_un_method, vnc_advertise_un_method_cmd, - "vnc advertise-un-method ", + "vnc advertise-un-method encap-attr", VNC_CONFIG_STR "Method of advertising UN addresses\n" - "Via Encapsulation SAFI\n" "Via Tunnel Encap attribute (in VPN SAFI)\n") { VTY_DECLVAR_CONTEXT(bgp, bgp); From 33c0d63f9cd85379ce858c98168cc9d1f03e1ae2 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:11:30 -0400 Subject: [PATCH 5/7] bgpd: remove encap safi show commands Signed-off-by: Lou Berger --- bgpd/bgp_encap.c | 526 ----------------------------------------------- bgpd/bgp_encap.h | 2 - bgpd/bgp_route.c | 17 +- bgpd/bgp_vty.c | 14 +- bgpd/bgp_vty.h | 3 +- 5 files changed, 7 insertions(+), 555 deletions(-) diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 977eb5fd4c..53f9d43c60 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -202,533 +202,7 @@ bgp_nlri_parse_encap( return 0; } -static int -show_adj_route_encap (struct vty *vty, struct peer *peer, struct prefix_rd *prd) -{ - struct bgp *bgp; - struct bgp_table *table; - struct bgp_node *rn; - struct bgp_node *rm; - struct attr *attr; - int rd_header; - int header = 1; - char v4_header[] = " Network Next Hop Metric LocPrf Weight Path%s"; - - bgp = bgp_get_default (); - if (bgp == NULL) - { - vty_out (vty, "No BGP process is configured%s", VTY_NEWLINE); - return CMD_WARNING; - } - - for (rn = bgp_table_top (bgp->rib[AFI_IP][SAFI_ENCAP]); rn; - rn = bgp_route_next (rn)) - { - if (prd && memcmp (rn->p.u.val, prd->val, 8) != 0) - continue; - - if ((table = rn->info) != NULL) - { - rd_header = 1; - - for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm)) - if ((attr = rm->info) != NULL) - { - if (header) - { - vty_out (vty, "BGP table version is 0, local router ID is %s%s", - inet_ntoa (bgp->router_id), VTY_NEWLINE); - vty_out (vty, "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal%s", - VTY_NEWLINE); - vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s%s", - VTY_NEWLINE, VTY_NEWLINE); - vty_out (vty, v4_header, VTY_NEWLINE); - header = 0; - } - - if (rd_header) - { - u_int16_t type; - struct rd_as rd_as; - struct rd_ip rd_ip; - u_char *pnt; - - pnt = rn->p.u.val; - - vty_out (vty, "Route Distinguisher: "); - - /* Decode RD type. */ - type = decode_rd_type (pnt); - - switch (type) { - - case RD_TYPE_AS: - decode_rd_as (pnt + 2, &rd_as); - vty_out (vty, "%u:%d", rd_as.as, rd_as.val); - break; - - case RD_TYPE_IP: - decode_rd_ip (pnt + 2, &rd_ip); - vty_out (vty, "%s:%d", inet_ntoa (rd_ip.ip), rd_ip.val); - break; - - default: - vty_out (vty, "unknown RD type"); - } - - - vty_out (vty, "%s", VTY_NEWLINE); - rd_header = 0; - } - route_vty_out_tmp (vty, &rm->p, attr, SAFI_ENCAP, 0, NULL); - } - } - } - return CMD_SUCCESS; -} - -int -bgp_show_encap ( - struct vty *vty, - afi_t afi, - struct prefix_rd *prd, - enum bgp_show_type type, - void *output_arg, - int tags) -{ - struct bgp *bgp; - struct bgp_table *table; - struct bgp_node *rn; - struct bgp_node *rm; - struct bgp_info *ri; - int rd_header; - int header = 1; - char v4_header[] = " Network Next Hop Metric LocPrf Weight Path%s"; - char v4_header_tag[] = " Network Next Hop In tag/Out tag%s"; - - unsigned long output_count = 0; - unsigned long total_count = 0; - - bgp = bgp_get_default (); - if (bgp == NULL) - { - vty_out (vty, "No BGP process is configured%s", VTY_NEWLINE); - return CMD_WARNING; - } - - if ((afi != AFI_IP) && (afi != AFI_IP6)) { - vty_out (vty, "Afi %d not supported%s", afi, VTY_NEWLINE); - return CMD_WARNING; - } - - for (rn = bgp_table_top (bgp->rib[afi][SAFI_ENCAP]); rn; rn = bgp_route_next (rn)) - { - if (prd && memcmp (rn->p.u.val, prd->val, 8) != 0) - continue; - - if ((table = rn->info) != NULL) - { - rd_header = 1; - - for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm)) - for (ri = rm->info; ri; ri = ri->next) - { - total_count++; - if (type == bgp_show_type_neighbor) - { - union sockunion *su = output_arg; - - if (ri->peer->su_remote == NULL || ! sockunion_same(ri->peer->su_remote, su)) - continue; - } - if (header) - { - if (tags) - vty_out (vty, v4_header_tag, VTY_NEWLINE); - else - { - vty_out (vty, "BGP table version is 0, local router ID is %s%s", - inet_ntoa (bgp->router_id), VTY_NEWLINE); - vty_out (vty, "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal%s", - VTY_NEWLINE); - vty_out (vty, "Origin codes: i - IGP, e - EGP, ? - incomplete%s%s", - VTY_NEWLINE, VTY_NEWLINE); - vty_out (vty, v4_header, VTY_NEWLINE); - } - header = 0; - } - - if (rd_header) - { - u_int16_t type; - struct rd_as rd_as; - struct rd_ip rd_ip; - u_char *pnt; - - pnt = rn->p.u.val; - - /* Decode RD type. */ - type = decode_rd_type (pnt); - - vty_out (vty, "Route Distinguisher: "); - - switch (type) { - - case RD_TYPE_AS: - decode_rd_as (pnt + 2, &rd_as); - vty_out (vty, "%u:%d", rd_as.as, rd_as.val); - break; - - case RD_TYPE_IP: - decode_rd_ip (pnt + 2, &rd_ip); - vty_out (vty, "%s:%d", inet_ntoa (rd_ip.ip), rd_ip.val); - break; - - default: - vty_out (vty, "Unknown RD type"); - break; - } - - vty_out (vty, "%s", VTY_NEWLINE); - rd_header = 0; - } - if (tags) - route_vty_out_tag (vty, &rm->p, ri, 0, SAFI_ENCAP, NULL); - else - route_vty_out (vty, &rm->p, ri, 0, SAFI_ENCAP, NULL); - output_count++; - } - } - } - - if (output_count == 0) - { - vty_out (vty, "No prefixes displayed, %ld exist%s", total_count, VTY_NEWLINE); - } - else - vty_out (vty, "%sDisplayed %ld routes and %ld total paths%s", - VTY_NEWLINE, output_count, total_count, VTY_NEWLINE); - - return CMD_SUCCESS; -} - -DEFUN (show_bgp_ipv4_encap_rd, - show_bgp_ipv4_encap_rd_cmd, - "show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n") -{ - int idx_rd = 5; - int ret; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - return bgp_show_encap (vty, AFI_IP, &prd, bgp_show_type_normal, NULL, 0); -} - -DEFUN (show_bgp_ipv6_encap_rd, - show_bgp_ipv6_encap_rd_cmd, - "show [ip] bgp ipv6 encap rd ASN:nn_or_IP-address:nn", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Display BGP tags for prefixes\n") -{ - int idx_rd = 5; - int ret; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_normal, NULL, 0); -} - -DEFUN (show_bgp_ipv4_encap_tags, - show_bgp_ipv4_encap_tags_cmd, - "show [ip] bgp ipv4 encap tags", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display BGP tags for prefixes\n") -{ - return bgp_show_encap (vty, AFI_IP, NULL, bgp_show_type_normal, NULL, 1); -} - -DEFUN (show_bgp_ipv6_encap_tags, - show_bgp_ipv6_encap_tags_cmd, - "show [ip] bgp ipv6 encap tags", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display BGP tags for prefixes\n") -{ - return bgp_show_encap (vty, AFI_IP6, NULL, bgp_show_type_normal, NULL, 1); -} - -DEFUN (show_bgp_ipv4_encap_rd_tags, - show_bgp_ipv4_encap_rd_tags_cmd, - "show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn tags", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Display BGP tags for prefixes\n") -{ - int idx_rd = 5; - int ret; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - return bgp_show_encap (vty, AFI_IP, &prd, bgp_show_type_normal, NULL, 1); -} - -DEFUN (show_bgp_ipv6_encap_rd_tags, - show_bgp_ipv6_encap_rd_tags_cmd, - "show [ip] bgp ipv6 encap rd ASN:nn_or_IP-address:nn tags", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Display BGP tags for prefixes\n") -{ - int idx_rd = 5; - int ret; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_normal, NULL, 1); -} - -DEFUN (show_bgp_ipv4_encap_rd_neighbor_routes, - show_bgp_ipv4_encap_rd_neighbor_routes_cmd, - "show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Display routes learned from neighbor\n") -{ - int idx_rd = 5; - int idx_peer = 7; - int ret; - union sockunion su; - struct peer *peer; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - - if (str2sockunion(argv[idx_peer]->arg, &su)) - { - vty_out (vty, "Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - - peer = peer_lookup (NULL, &su); - if (! peer || ! peer->afc[AFI_IP][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return bgp_show_encap (vty, AFI_IP, &prd, bgp_show_type_neighbor, &su, 0); -} - -DEFUN (show_bgp_ipv6_encap_rd_neighbor_routes, - show_bgp_ipv6_encap_rd_neighbor_routes_cmd, - "show [ip] bgp ipv6 encap rd ASN:nn_or_IP-address:nn neighbors routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Display routes learned from neighbor\n") -{ - int idx_rd = 5; - int idx_peer = 7; - int ret; - union sockunion su; - struct peer *peer; - struct prefix_rd prd; - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - - if (str2sockunion(argv[idx_peer]->arg, &su)) - { - vty_out (vty, "Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - - peer = peer_lookup (NULL, &su); - if (! peer || ! peer->afc[AFI_IP6][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_neighbor, &su, 0); -} - -DEFUN (show_bgp_ipv4_encap_rd_neighbor_advertised_routes, - show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd, - "show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors advertised-routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Display the routes advertised to a BGP neighbor\n") -{ - int idx_rd = 5; - int idx_peer = 7; - int ret; - struct peer *peer; - struct prefix_rd prd; - union sockunion su; - - ret = str2sockunion (argv[idx_peer]->arg, &su); - if (ret < 0) - { - vty_out (vty, "%% Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - peer = peer_lookup (NULL, &su); - if (! peer || ! peer->afc[AFI_IP][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return show_adj_route_encap (vty, peer, &prd); -} - -DEFUN (show_bgp_ipv6_encap_rd_neighbor_advertised_routes, - show_bgp_ipv6_encap_rd_neighbor_advertised_routes_cmd, - "show [ip] bgp ipv6 encap rd ASN:nn_or_IP-address:nn neighbors advertised-routes", - SHOW_STR - IP_STR - BGP_STR - "Address Family\n" - "Display ENCAP NLRI specific information\n" - "Display information for a route distinguisher\n" - "ENCAP Route Distinguisher\n" - "Detailed information on TCP and BGP neighbor connections\n" - "Neighbor to display information about\n" - "Neighbor to display information about\n" - "Display the routes advertised to a BGP neighbor\n") -{ - int idx_rd = 5; - int idx_peer = 7; - int ret; - struct peer *peer; - struct prefix_rd prd; - union sockunion su; - - ret = str2sockunion (argv[idx_peer]->arg, &su); - if (ret < 0) - { - vty_out (vty, "%% Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE); - return CMD_WARNING; - } - peer = peer_lookup (NULL, &su); - if (! peer || ! peer->afc[AFI_IP6][SAFI_ENCAP]) - { - vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE); - return CMD_WARNING; - } - - ret = str2prefix_rd (argv[idx_rd]->arg, &prd); - if (! ret) - { - vty_out (vty, "%% Malformed Route Distinguisher%s", VTY_NEWLINE); - return CMD_WARNING; - } - - return show_adj_route_encap (vty, peer, &prd); -} - void bgp_encap_init (void) { - install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_tags_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_tags_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_neighbor_routes_cmd); - install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd); - - install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_encap_tags_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_tags_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_routes_cmd); - install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_advertised_routes_cmd); } diff --git a/bgpd/bgp_encap.h b/bgpd/bgp_encap.h index 4d57fca79d..dd3c868e3f 100644 --- a/bgpd/bgp_encap.h +++ b/bgpd/bgp_encap.h @@ -25,7 +25,5 @@ extern void bgp_encap_init (void); extern int bgp_nlri_parse_encap (struct peer *, struct attr *, struct bgp_nlri *); -extern int bgp_show_encap (struct vty *vty, afi_t afi, struct prefix_rd *prd, - enum bgp_show_type type, void *output_arg, int tags); #include "bgp_encap_types.h" #endif /* _QUAGGA_BGP_ENCAP_H */ diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 13279f89b1..a4c8f0bd1b 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -7840,12 +7840,6 @@ bgp_show (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi, return bgp_show_mpls_vpn(vty, afi, NULL, type, output_arg, 0, use_json); } - if (safi == SAFI_ENCAP) - { - return bgp_show_encap(vty, afi, NULL, type, output_arg, - 0); - } - table = bgp->rib[afi][safi]; @@ -8217,7 +8211,7 @@ bgp_show_lcommunity_list (struct vty *vty, struct bgp *bgp, const char *lcom, DEFUN (show_ip_bgp_large_community_list, show_ip_bgp_large_community_list_cmd, - "show [ip] bgp [ WORD] [ []] large-community-list <(1-500)|WORD> [json]", + "show [ip] bgp [ WORD] [ []] large-community-list <(1-500)|WORD> [json]", SHOW_STR IP_STR BGP_STR @@ -8227,7 +8221,6 @@ DEFUN (show_ip_bgp_large_community_list, "Address Family modifier\n" "Address Family modifier\n" "Address Family modifier\n" - "Address Family modifier\n" "Display routes matching the large-community-list\n" "large-community-list number\n" "large-community-list name\n" @@ -8263,7 +8256,7 @@ DEFUN (show_ip_bgp_large_community_list, } DEFUN (show_ip_bgp_large_community, show_ip_bgp_large_community_cmd, - "show [ip] bgp [ WORD] [ []] large-community [AA:BB:CC] [json]", + "show [ip] bgp [ WORD] [ []] large-community [AA:BB:CC] [json]", SHOW_STR IP_STR BGP_STR @@ -8273,7 +8266,6 @@ DEFUN (show_ip_bgp_large_community, "Address Family modifier\n" "Address Family modifier\n" "Address Family modifier\n" - "Address Family modifier\n" "Display routes matching the large-communities\n" "List of large-community numbers\n" JSON_STR) @@ -8429,8 +8421,6 @@ DEFUN (show_ip_bgp, if (safi == SAFI_MPLS_VPN) return bgp_show_mpls_vpn (vty, afi, NULL, bgp_show_type_normal, NULL, 0, uj); - else if (safi == SAFI_ENCAP) - return bgp_show_encap (vty, afi, NULL, bgp_show_type_normal, NULL, 0); else return bgp_show (vty, bgp, afi, safi, sh_type, NULL, uj); } @@ -9214,7 +9204,7 @@ bgp_peer_counts (struct vty *vty, struct peer *peer, afi_t afi, safi_t safi, u_c DEFUN (show_ip_bgp_instance_neighbor_prefix_counts, show_ip_bgp_instance_neighbor_prefix_counts_cmd, - "show [ip] bgp [ WORD] [ []] " + "show [ip] bgp [ WORD] [ []] " "neighbors prefix-counts [json]", SHOW_STR IP_STR @@ -9225,7 +9215,6 @@ DEFUN (show_ip_bgp_instance_neighbor_prefix_counts, "Address Family modifier\n" "Address Family modifier\n" "Address Family modifier\n" - "Address Family modifier\n" "Detailed information on TCP and BGP neighbor connections\n" "Neighbor to display information about\n" "Neighbor to display information about\n" diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 4d00fc963f..66689c8367 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -155,7 +155,7 @@ argv_find_and_parse_afi(struct cmd_token **argv, int argc, int *index, afi_t *af return ret; } -/* supports */ +/* supports */ safi_t bgp_vty_safi_from_arg(const char *safi_str) { @@ -164,8 +164,6 @@ bgp_vty_safi_from_arg(const char *safi_str) safi = SAFI_MULTICAST; else if (strncmp (safi_str, "u", 1) == 0) safi = SAFI_UNICAST; - else if (strncmp (safi_str, "e", 1) == 0) - safi = SAFI_ENCAP; else if (strncmp (safi_str, "v", 1) == 0) safi = SAFI_MPLS_VPN; return safi; @@ -193,12 +191,6 @@ argv_find_and_parse_safi (struct cmd_token **argv, int argc, int *index, safi_t if (safi) *safi = SAFI_MPLS_VPN; } - else if (argv_find (argv, argc, "encap", index)) - { - ret = 1; - if (safi) - *safi = SAFI_ENCAP; - } else if (argv_find (argv, argc, "evpn", index)) { ret = 1; @@ -218,12 +210,12 @@ argv_find_and_parse_safi (struct cmd_token **argv, int argc, int *index, safi_t * that is being parsed. * * The show commands are generally of the form: - * "show [ip] bgp [ WORD] [ []] ..." + * "show [ip] bgp [ WORD] [ []] ..." * * Since we use argv_find if the show command in particular doesn't have: * [ip] * [ WORD] - * [ []] + * [ []] * The command parsing should still be ok. * * vty -> The vty for the command so we can output some useful data in diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h index 33d24d530e..522eeabefb 100644 --- a/bgpd/bgp_vty.h +++ b/bgpd/bgp_vty.h @@ -28,9 +28,8 @@ struct bgp; #define BGP_AFI_CMD_STR "" #define BGP_AFI_HELP_STR "Address Family\nAddress Family\n" -#define BGP_SAFI_CMD_STR "" +#define BGP_SAFI_CMD_STR "" #define BGP_SAFI_HELP_STR \ - "Address Family modifier\n" \ "Address Family modifier\n" \ "Address Family modifier\n" \ "Address Family modifier\n" From 796e5801cfb9ca0f0f841c4e9ff74dd2081a3729 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:15:45 -0400 Subject: [PATCH 6/7] bgpd: remove encap_safi rx processing Signed-off-by: Lou Berger --- bgpd/bgp_encap.c | 152 ---------------------------------------------- bgpd/bgp_encap.h | 1 - bgpd/bgp_packet.c | 2 - 3 files changed, 155 deletions(-) diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 53f9d43c60..debd94d7ce 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -50,158 +50,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/rfapi/rfapi_backend.h" #endif -static void -ecom2prd(struct ecommunity *ecom, struct prefix_rd *prd) -{ - int i; - - memset(prd, 0, sizeof(struct prefix_rd)); - prd->family = AF_UNSPEC; - prd->prefixlen = 64; - - if (!ecom) - return; - - for (i = 0; i < (ecom->size * ECOMMUNITY_SIZE); i += ECOMMUNITY_SIZE) { - - uint8_t *ep; - - ep = ecom->val + i; - - switch (ep[0]) { - default: - continue; - - case 0x80: - case 0x81: - case 0x82: - if (ep[1] == 0x0) { - prd->val[1] = ep[0] & 0x03; - memcpy(prd->val + 2, ep + 2, 6); - return; - } - } - } -} - -int -bgp_nlri_parse_encap( - struct peer *peer, - struct attr *attr, - struct bgp_nlri *packet) -{ - u_char *pnt; - u_char *lim; - afi_t afi = packet->afi; - struct prefix p; - int psize = 0; - int prefixlen; - struct rd_as rd_as; - struct rd_ip rd_ip; - struct prefix_rd prd; - struct ecommunity *pEcom = NULL; - u_int16_t rdtype = 0xffff; - char buf[BUFSIZ]; - - /* Check peer status. */ - if (peer->status != Established) - return 0; - - /* Make prefix_rd */ - if (attr && attr->extra && attr->extra->ecommunity) - pEcom = attr->extra->ecommunity; - - ecom2prd(pEcom, &prd); - memset(&rd_as, 0, sizeof(rd_as)); - memset(&rd_ip, 0, sizeof(rd_ip)); - - if (pEcom) { - - rdtype = (prd.val[0] << 8) | prd.val[1]; - - /* Decode RD value. */ - if (rdtype == RD_TYPE_AS) - decode_rd_as (prd.val + 2, &rd_as); - else if (rdtype == RD_TYPE_IP) - decode_rd_ip (prd.val + 2, &rd_ip); - else if (rdtype == RD_TYPE_AS4) - decode_rd_as4 (prd.val + 2, &rd_as); - else - { - zlog_err ("Invalid RD type %d", rdtype); - } - - } - - /* - * NB: this code was based on the MPLS VPN code, which supported RDs. - * For the moment we are retaining the underlying RIB structure that - * keeps a per-RD radix tree, but since the RDs are not carried over - * the wire, we set the RD internally to 0. - */ - prd.family = AF_UNSPEC; - prd.prefixlen = 64; - memset(prd.val, 0, sizeof(prd.val)); - - pnt = packet->nlri; - lim = pnt + packet->length; - - for (; pnt < lim; pnt += psize) - { - /* Clear prefix structure. */ - memset (&p, 0, sizeof (struct prefix)); - - /* Fetch prefix length. */ - prefixlen = *pnt++; - p.family = afi2family(afi); - if (p.family == 0) { - /* bad afi, shouldn't happen */ - zlog_warn("%s: bad afi %d, dropping incoming route", __func__, afi); - continue; - } - psize = PSIZE (prefixlen); - - p.prefixlen = prefixlen; - memcpy (&p.u.prefix, pnt, psize); - - if (pnt + psize > lim) - return -1; - - - if (rdtype == RD_TYPE_AS) - zlog_info ("rd-as %u:%u prefix %s/%d", rd_as.as, rd_as.val, - inet_ntop (p.family, &p.u.prefix, buf, BUFSIZ), - p.prefixlen); - else if (rdtype == RD_TYPE_IP) - zlog_info ("rd-ip %s:%u prefix %s/%d", inet_ntoa (rd_ip.ip), - rd_ip.val, - inet_ntop (p.family, &p.u.prefix, buf, BUFSIZ), - p.prefixlen); - else if (rdtype == RD_TYPE_AS4) - zlog_info ("rd-as4 %u:%u prefix %s/%d", rd_as.as, rd_as.val, - inet_ntop (p.family, &p.u.prefix, buf, BUFSIZ), - p.prefixlen); - else - zlog_info ("rd unknown, default to 0:0 prefix %s/%d", - inet_ntop (p.family, &p.u.prefix, buf, BUFSIZ), - p.prefixlen); - - if (attr) { - bgp_update (peer, &p, 0, attr, afi, SAFI_ENCAP, - ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, NULL, 0, NULL); - } else { - bgp_withdraw (peer, &p, 0, attr, afi, SAFI_ENCAP, - ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, NULL, NULL); - } - } - - /* Packet length consistency check. */ - if (pnt != lim) - return -1; - - return 0; -} - void bgp_encap_init (void) { diff --git a/bgpd/bgp_encap.h b/bgpd/bgp_encap.h index dd3c868e3f..37ccf13190 100644 --- a/bgpd/bgp_encap.h +++ b/bgpd/bgp_encap.h @@ -24,6 +24,5 @@ #include "bgpd/bgp_route.h" extern void bgp_encap_init (void); -extern int bgp_nlri_parse_encap (struct peer *, struct attr *, struct bgp_nlri *); #include "bgp_encap_types.h" #endif /* _QUAGGA_BGP_ENCAP_H */ diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 661dce133c..9e81374694 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -1347,8 +1347,6 @@ bgp_nlri_parse (struct peer *peer, struct attr *attr, struct bgp_nlri *packet, i return bgp_nlri_parse_ip (peer, mp_withdraw?NULL:attr, packet); case SAFI_MPLS_VPN: return bgp_nlri_parse_vpn (peer, mp_withdraw?NULL:attr, packet); - case SAFI_ENCAP: - return bgp_nlri_parse_encap (peer, mp_withdraw?NULL:attr, packet); case SAFI_EVPN: return bgp_nlri_parse_evpn (peer, attr, packet, mp_withdraw); } From 26a4b7c3c35f1fc1b0f72622d85330d95636a761 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Tue, 23 May 2017 15:34:43 -0400 Subject: [PATCH 7/7] bgpd: remove encap safi vty related files bgp_encap.h|c Signed-off-by: Lou Berger --- bgpd/Makefile.am | 4 ++-- bgpd/bgp_encap.c | 56 ----------------------------------------------- bgpd/bgp_encap.h | 28 ------------------------ bgpd/bgp_packet.c | 2 -- bgpd/bgp_route.c | 1 - bgpd/bgpd.c | 2 -- vtysh/Makefile.am | 1 - 7 files changed, 2 insertions(+), 92 deletions(-) delete mode 100644 bgpd/bgp_encap.c delete mode 100644 bgpd/bgp_encap.h diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am index b6ed9a4d6d..ad455edfcd 100644 --- a/bgpd/Makefile.am +++ b/bgpd/Makefile.am @@ -80,7 +80,7 @@ libbgp_a_SOURCES = \ bgp_mplsvpn.c bgp_nexthop.c \ bgp_damp.c bgp_table.c bgp_advertise.c bgp_vty.c bgp_mpath.c \ bgp_nht.c bgp_updgrp.c bgp_updgrp_packet.c bgp_updgrp_adv.c bgp_bfd.c \ - bgp_encap.c bgp_encap_tlv.c $(BGP_VNC_RFAPI_SRC) bgp_attr_evpn.c \ + bgp_encap_tlv.c $(BGP_VNC_RFAPI_SRC) bgp_attr_evpn.c \ bgp_evpn.c bgp_evpn_vty.c bgp_vpn.c noinst_HEADERS = \ @@ -91,7 +91,7 @@ noinst_HEADERS = \ bgp_ecommunity.h bgp_lcommunity.h \ bgp_mplsvpn.h bgp_nexthop.h bgp_damp.h bgp_table.h \ bgp_advertise.h bgp_vty.h bgp_mpath.h bgp_nht.h \ - bgp_updgrp.h bgp_bfd.h bgp_encap.h bgp_encap_tlv.h bgp_encap_types.h \ + bgp_updgrp.h bgp_bfd.h bgp_encap_tlv.h bgp_encap_types.h \ $(BGP_VNC_RFAPI_HD) bgp_attr_evpn.h bgp_evpn.h bgp_evpn_vty.h bgp_vpn.h bgpd_SOURCES = bgp_main.c diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c deleted file mode 100644 index debd94d7ce..0000000000 --- a/bgpd/bgp_encap.c +++ /dev/null @@ -1,56 +0,0 @@ - -/* - * This file created by LabN Consulting, L.L.C. - * - * - * This file is based on bgp_mplsvpn.c which is Copyright (C) 2000 - * Kunihiro Ishiguro - * - */ - -/* - -This file is part of GNU Zebra. - -GNU Zebra is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -GNU Zebra is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Zebra; see the file COPYING. If not, write to the Free -Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ - -#include - -#include "command.h" -#include "prefix.h" -#include "log.h" -#include "memory.h" -#include "stream.h" -#include "filter.h" - -#include "bgpd/bgpd.h" -#include "bgpd/bgp_table.h" -#include "bgpd/bgp_route.h" -#include "bgpd/bgp_attr.h" -#include "bgpd/bgp_ecommunity.h" -#include "bgpd/bgp_lcommunity.h" -#include "bgpd/bgp_mplsvpn.h" -#include "bgpd/bgp_vty.h" -#include "bgpd/bgp_encap.h" - -#if ENABLE_BGP_VNC -#include "bgpd/rfapi/rfapi_backend.h" -#endif - -void -bgp_encap_init (void) -{ -} diff --git a/bgpd/bgp_encap.h b/bgpd/bgp_encap.h deleted file mode 100644 index 37ccf13190..0000000000 --- a/bgpd/bgp_encap.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * - * Copyright 2009-2015, LabN Consulting, L.L.C. - * - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - */ - -#ifndef _QUAGGA_BGP_ENCAP_H -#define _QUAGGA_BGP_ENCAP_H -#include "bgpd/bgp_route.h" - -extern void bgp_encap_init (void); -#include "bgp_encap_types.h" -#endif /* _QUAGGA_BGP_ENCAP_H */ diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 9e81374694..77395bf859 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -50,8 +50,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/bgp_network.h" #include "bgpd/bgp_mplsvpn.h" #include "bgpd/bgp_evpn.h" -#include "bgpd/bgp_encap.h" -#include "bgpd/bgp_evpn.h" #include "bgpd/bgp_advertise.h" #include "bgpd/bgp_vty.h" #include "bgpd/bgp_updgrp.h" diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index a4c8f0bd1b..38e696d11b 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -53,7 +53,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/bgp_filter.h" #include "bgpd/bgp_fsm.h" #include "bgpd/bgp_mplsvpn.h" -#include "bgpd/bgp_encap.h" #include "bgpd/bgp_nexthop.h" #include "bgpd/bgp_damp.h" #include "bgpd/bgp_advertise.h" diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 1da69c9f32..94433df2f3 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -61,7 +61,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/bgp_nexthop.h" #include "bgpd/bgp_damp.h" #include "bgpd/bgp_mplsvpn.h" -#include "bgpd/bgp_encap.h" #if ENABLE_BGP_VNC #include "bgpd/rfapi/bgp_rfapi_cfg.h" #include "bgpd/rfapi/rfapi_backend.h" @@ -7695,7 +7694,6 @@ bgp_init (void) bgp_route_map_init (); bgp_scan_vty_init(); bgp_mplsvpn_init (); - bgp_encap_init (); #if ENABLE_BGP_VNC rfapi_init (); #endif diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am index 9b81f99607..a8dbb8d71d 100644 --- a/vtysh/Makefile.am +++ b/vtysh/Makefile.am @@ -47,7 +47,6 @@ if BGPD vtysh_scan += $(top_srcdir)/bgpd/bgp_bfd.c vtysh_scan += $(top_srcdir)/bgpd/bgp_debug.c vtysh_scan += $(top_srcdir)/bgpd/bgp_dump.c -vtysh_scan += $(top_srcdir)/bgpd/bgp_encap.c vtysh_scan += $(top_srcdir)/bgpd/bgp_evpn_vty.c vtysh_scan += $(top_srcdir)/bgpd/bgp_filter.c vtysh_scan += $(top_srcdir)/bgpd/bgp_mplsvpn.c