static struct peer_group *
listen_range_exists (struct bgp *bgp, struct prefix *range, int exact);
+#if 0
+#define INSTALL_CMD_ON_AF_NODES(cmd) \
+ install_element(BGP_IPV4_NODE, cmd); \
+ install_element(BGP_IPV4M_NODE, cmd); \
+ install_element(BGP_IPV4L_NODE, cmd); \
+ install_element(BGP_IPV6_NODE, cmd); \
+ install_element(BGP_IPV6M_NODE, cmd); \
+ install_element(BGP_IPV6L_NODE, cmd); \
+ install_element(BGP_VPNV4_NODE, cmd);
+#endif
+static enum node_type
+bgp_node_type (afi_t afi, safi_t safi)
+{
+ switch (afi)
+ {
+ case AFI_IP:
+ switch (safi)
+ {
+ case SAFI_UNICAST:
+ return BGP_IPV4_NODE;
+ break;
+ case SAFI_MULTICAST:
+ return BGP_IPV4M_NODE;
+ break;
+ case SAFI_LABELED_UNICAST:
+ return BGP_IPV4L_NODE;
+ break;
+ case SAFI_MPLS_VPN:
+ return BGP_VPNV4_NODE;
+ break;
+ case SAFI_ENCAP:
+ return BGP_ENCAP_NODE;
+ break;
+ }
+ break;
+ case AFI_IP6:
+ switch (safi)
+ {
+ case SAFI_UNICAST:
+ return BGP_IPV6_NODE;
+ break;
+ case SAFI_MULTICAST:
+ return BGP_IPV6M_NODE;
+ break;
+ case SAFI_LABELED_UNICAST:
+ return BGP_IPV6L_NODE;
+ break;
+ case SAFI_MPLS_VPN:
+ return BGP_VPNV6_NODE;
+ break;
+ case SAFI_ENCAP:
+ return BGP_ENCAP_NODE;
+ break;
+ }
+ break;
+ case AFI_L2VPN:
+ return BGP_EVPN_NODE;
+ break;
+ case AFI_MAX:
+ // We should never be here but to clarify the switch statement..
+ return BGP_IPV4_NODE;
+ break;
+ }
+
+ // Impossible to happen
+ return BGP_IPV4_NODE;
+}
/* Utility function to get address family from current node. */
afi_t
{
case BGP_IPV6_NODE:
case BGP_IPV6M_NODE:
+ case BGP_IPV6L_NODE:
case BGP_VPNV6_NODE:
case BGP_ENCAPV6_NODE:
afi = AFI_IP6;
break;
+ case BGP_EVPN_NODE:
+ afi = AFI_L2VPN;
+ break;
default:
afi = AFI_IP;
break;
case BGP_IPV6M_NODE:
safi = SAFI_MULTICAST;
break;
+ case BGP_EVPN_NODE:
+ safi = SAFI_EVPN;
+ break;
+ case BGP_IPV4L_NODE:
+ case BGP_IPV6L_NODE:
+ safi = SAFI_LABELED_UNICAST;
+ break;
default:
safi = SAFI_UNICAST;
break;
else if (!strcmp(afi_str, "ipv6")) {
afi = AFI_IP6;
}
+ else if (!strcmp(afi_str, "l2vpn")) {
+ afi = AFI_L2VPN;
+ }
return afi;
}
return ret;
}
-/* supports <unicast|multicast|vpn|encap> */
+/* supports <unicast|multicast|vpn|encap|labeled-unicast> */
safi_t
bgp_vty_safi_from_arg(const char *safi_str)
{
safi = SAFI_ENCAP;
else if (strncmp (safi_str, "v", 1) == 0)
safi = SAFI_MPLS_VPN;
+ else if (strncmp (safi_str, "l", 1) == 0)
+ safi = SAFI_LABELED_UNICAST;
return safi;
}
if (safi)
*safi = SAFI_MULTICAST;
}
+ else if (argv_find (argv, argc, "labeled-unicast", index))
+ {
+ ret = 1;
+ if (safi)
+ *safi = SAFI_LABELED_UNICAST;
+ }
else if (argv_find (argv, argc, "vpn", index))
{
ret = 1;
if (safi)
*safi = SAFI_ENCAP;
}
+ else if (argv_find (argv, argc, "evpn", index))
+ {
+ ret = 1;
+ if (safi)
+ *safi = SAFI_EVPN;
+ }
return ret;
}
/*
- * bgp_vty_find_and_parse_afi_safi_vrf
+ * bgp_vty_find_and_parse_afi_safi_bgp
*
- * For a given 'show ...' command, correctly parse the afi/safi/vrf out from it
- * This function *assumes* that the calling function pre-sets the afi/safi/vrf
+ * For a given 'show ...' command, correctly parse the afi/safi/bgp out from it
+ * This function *assumes* that the calling function pre-sets the afi/safi/bgp
* to appropriate values for the calling function. This is to allow the
* calling function to make decisions appropriate for the show command
* that is being parsed.
*
* The show commands are generally of the form:
- * "show [ip] bgp [<view|vrf> WORD] [<ipv4|ipv6> [<unicast|multicast|vpn|encap>]] ..."
+ * "show [ip] bgp [<view|vrf> WORD] [<ipv4|ipv6> [<unicast|multicast|vpn|encap|labeled-unicast>]] ..."
*
* Since we use argv_find if the show command in particular doesn't have:
* [ip]
* [<view|vrf> WORD]
- * [<ipv4|ipv6> [<unicast|multicast|vpn|encap>]]
+ * [<ipv4|ipv6> [<unicast|multicast|vpn|encap|labeled-unicast>]]
* The command parsing should still be ok.
*
* vty -> The vty for the command so we can output some useful data in
* idx -> The current place in the command, generally should be 0 for this function
* afi -> The parsed afi if it was included in the show command, returned here
* safi -> The parsed safi if it was included in the show command, returned here
- * vrf -> The parsed vrf id if it was included in the show command, returned here
+ * bgp -> Pointer to the bgp data structure we need to fill in.
*
* The function returns the correct location in the parse tree for the
* last token found.
* it found the last token.
*/
int
-bgp_vty_find_and_parse_afi_safi_vrf (struct vty *vty, struct cmd_token **argv, int argc, int *idx,
- afi_t *afi, safi_t *safi, vrf_id_t *vrf)
+bgp_vty_find_and_parse_afi_safi_bgp (struct vty *vty, struct cmd_token **argv, int argc, int *idx,
+ afi_t *afi, safi_t *safi, struct bgp **bgp)
{
char *vrf_name = NULL;
assert (afi);
assert (safi);
- assert (vrf && *vrf != VRF_UNKNOWN);
+ assert (bgp);
if (argv_find (argv, argc, "ip", idx))
*afi = AFI_IP;
if (argv_find (argv, argc, "view", idx) || argv_find (argv, argc, "vrf", idx))
{
vrf_name = argv[*idx + 1]->arg;
- *idx += 2;
- }
-
- if (argv_find_and_parse_afi (argv, argc, idx, afi))
- argv_find_and_parse_safi (argv, argc, idx, safi);
- if (vrf_name)
- {
- if (strmatch(vrf_name, "all"))
- *vrf = VRF_ALL;
+ if (strmatch (vrf_name, "all"))
+ *bgp = NULL;
else
- *vrf = vrf_name_to_id (vrf_name);
+ {
+ *bgp = bgp_lookup_by_name (vrf_name);
+ if (!*bgp)
+ {
+ vty_out (vty, "View/Vrf specified is unknown: %s%s", vrf_name, VTY_NEWLINE);
+ *idx = 0;
+ return 0;
+ }
+ }
}
-
- if (*vrf == VRF_UNKNOWN)
+ else
{
- vty_out (vty, "View/Vrf specified is unknown: %s", vrf_name);
- *idx = 0;
- return 0;
+ *bgp = bgp_get_default ();
+ if (!*bgp)
+ {
+ vty_out (vty, "Unable to find default BGP instance%s", VTY_NEWLINE);
+ *idx = 0;
+ return 0;
+ }
}
+ if (argv_find_and_parse_afi (argv, argc, idx, afi))
+ argv_find_and_parse_safi (argv, argc, idx, safi);
+
*idx += 1;
return *idx;
}
}
/* "router bgp" commands. */
-DEFUN (router_bgp,
+DEFUN_NOSH (router_bgp,
router_bgp_cmd,
"router bgp [(1-4294967295) [<view|vrf> WORD]]",
ROUTER_STR
if (set)
{
maxpaths = strtol(mpaths, NULL, 10);
+ if (maxpaths > multipath_num)
+ {
+ vty_out (vty,
+ "%% Maxpaths Specified: %d is > than multipath num specified on bgp command line %d",
+ maxpaths, multipath_num);
+ return CMD_WARNING;
+ }
ret = bgp_maximum_paths_set (bgp, afi, safi, peer_type, maxpaths, options);
}
else
return CMD_WARNING;
}
+ if (!set && flag == PEER_FLAG_SHUTDOWN)
+ peer_tx_shutdown_message_unset (peer);
+
if (set)
ret = peer_flag_set (peer, flag);
else
}
/* neighbor shutdown. */
-DEFUN (neighbor_shutdown,
- neighbor_shutdown_cmd,
- "neighbor <A.B.C.D|X:X::X:X|WORD> shutdown",
+DEFUN (neighbor_shutdown_msg,
+ neighbor_shutdown_msg_cmd,
+ "neighbor <A.B.C.D|X:X::X:X|WORD> shutdown message MSG...",
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
- "Administratively shut down this neighbor\n")
+ "Administratively shut down this neighbor\n"
+ "Add a shutdown message (draft-ietf-idr-shutdown-06)\n"
+ "Shutdown message\n")
{
int idx_peer = 1;
+
+ if (argc >= 5)
+ {
+ struct peer *peer = peer_and_group_lookup_vty (vty, argv[idx_peer]->arg);
+ char *message;
+
+ if (!peer)
+ return CMD_WARNING;
+ message = argv_concat (argv, argc, 4);
+ peer_tx_shutdown_message_set (peer, message);
+ XFREE (MTYPE_TMP, message);
+ }
+
return peer_flag_set_vty (vty, argv[idx_peer]->arg, PEER_FLAG_SHUTDOWN);
}
-DEFUN (no_neighbor_shutdown,
- no_neighbor_shutdown_cmd,
- "no neighbor <A.B.C.D|X:X::X:X|WORD> shutdown",
- NO_STR
+ALIAS (neighbor_shutdown_msg,
+ neighbor_shutdown_cmd,
+ "neighbor <A.B.C.D|X:X::X:X|WORD> shutdown",
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Administratively shut down this neighbor\n")
+
+DEFUN (no_neighbor_shutdown_msg,
+ no_neighbor_shutdown_msg_cmd,
+ "no neighbor <A.B.C.D|X:X::X:X|WORD> shutdown message MSG...",
+ NO_STR
+ NEIGHBOR_STR
+ NEIGHBOR_ADDR_STR2
+ "Administratively shut down this neighbor\n"
+ "Remove a shutdown message (draft-ietf-idr-shutdown-06)\n"
+ "Shutdown message\n")
{
int idx_peer = 2;
+
return peer_flag_unset_vty (vty, argv[idx_peer]->arg, PEER_FLAG_SHUTDOWN);
}
+ALIAS (no_neighbor_shutdown_msg,
+ no_neighbor_shutdown_cmd,
+ "no neighbor <A.B.C.D|X:X::X:X|WORD> shutdown",
+ NO_STR
+ NEIGHBOR_STR
+ NEIGHBOR_ADDR_STR2
+ "Administratively shut down this neighbor\n")
+
/* neighbor capability dynamic. */
DEFUN (neighbor_capability_dynamic,
neighbor_capability_dynamic_cmd,
PEER_FLAG_ADDPATH_TX_BESTPATH_PER_AS);
}
-DEFUN (address_family_ipv4_safi,
+DEFUN_NOSH (address_family_ipv4_safi,
address_family_ipv4_safi_cmd,
- "address-family ipv4 [<unicast|multicast|vpn|encap>]",
+ "address-family ipv4 [<unicast|multicast|vpn|encap|labeled-unicast>]",
"Enter Address Family command mode\n"
"Address Family\n"
BGP_SAFI_HELP_STR)
{
- int idx_safi = 2;
- if (argc == (idx_safi + 1))
+
+ if (argc == 3)
{
- switch (bgp_vty_safi_from_arg(argv[idx_safi]->arg))
- {
- 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;
- case SAFI_UNICAST:
- default:
- vty->node = BGP_IPV4_NODE;
- break;
- }
+ safi_t safi = bgp_vty_safi_from_arg(argv[2]->arg);
+ vty->node = bgp_node_type(AFI_IP, safi);
}
else
vty->node = BGP_IPV4_NODE;
return CMD_SUCCESS;
}
-DEFUN (address_family_ipv6_safi,
+DEFUN_NOSH (address_family_ipv6_safi,
address_family_ipv6_safi_cmd,
- "address-family ipv6 [<unicast|multicast|vpn|encap>]",
+ "address-family ipv6 [<unicast|multicast|vpn|encap|labeled-unicast>]",
"Enter Address Family command mode\n"
"Address Family\n"
BGP_SAFI_HELP_STR)
{
- int idx_safi = 2;
- if (argc == (idx_safi + 1))
+ if (argc == 3)
{
- switch (bgp_vty_safi_from_arg(argv[idx_safi]->arg))
- {
- 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;
- case SAFI_UNICAST:
- default:
- vty->node = BGP_IPV6_NODE;
- break;
- }
+ safi_t safi = bgp_vty_safi_from_arg(argv[2]->arg);
+ vty->node = bgp_node_type(AFI_IP6, safi);
}
else
vty->node = BGP_IPV6_NODE;
}
#ifdef KEEP_OLD_VPN_COMMANDS
-DEFUN (address_family_vpnv4,
+DEFUN_NOSH (address_family_vpnv4,
address_family_vpnv4_cmd,
"address-family vpnv4 [unicast]",
"Enter Address Family command mode\n"
return CMD_SUCCESS;
}
-DEFUN (address_family_vpnv6,
+DEFUN_NOSH (address_family_vpnv6,
address_family_vpnv6_cmd,
"address-family vpnv6 [unicast]",
"Enter Address Family command mode\n"
}
#endif
-DEFUN (address_family_encap,
+DEFUN_NOSH (address_family_encap,
address_family_encap_cmd,
"address-family <encap|encapv4>",
"Enter Address Family command mode\n"
}
-DEFUN (address_family_encapv6,
+DEFUN_NOSH (address_family_encapv6,
address_family_encapv6_cmd,
"address-family encapv6",
"Enter Address Family command mode\n"
return CMD_SUCCESS;
}
-DEFUN (exit_address_family,
+DEFUN_NOSH (address_family_evpn,
+ address_family_evpn_cmd,
+ "address-family <l2vpn evpn>",
+ "Enter Address Family command mode\n"
+ "EVPN Address family\n"
+ "Layer2 VPN Address family\n"
+ "Ethernet Virtual Private Network Subsequent Address Family\n")
+{
+ vty->node = BGP_EVPN_NODE;
+ return CMD_SUCCESS;
+}
+
+DEFUN_NOSH (exit_address_family,
exit_address_family_cmd,
"exit-address-family",
"Exit from Address Family configuration mode\n")
{
if (vty->node == BGP_IPV4_NODE
|| vty->node == BGP_IPV4M_NODE
+ || vty->node == BGP_IPV4L_NODE
|| vty->node == BGP_VPNV4_NODE
|| vty->node == BGP_IPV6_NODE
|| vty->node == BGP_IPV6M_NODE
+ || vty->node == BGP_IPV6L_NODE
|| vty->node == BGP_VPNV6_NODE
|| vty->node == BGP_ENCAP_NODE
- || vty->node == BGP_ENCAPV6_NODE)
+ || vty->node == BGP_ENCAPV6_NODE
+ || vty->node == BGP_EVPN_NODE)
vty->node = BGP_NODE;
return CMD_SUCCESS;
}
"Push out prefix-list ORF and do inbound soft reconfig\n"
BGP_SOFT_OUT_STR)
{
- VTY_DECLVAR_CONTEXT(bgp, bgp);
char *vrf = NULL;
afi_t afi = AFI_IP6;
clr_sort = clear_group;
idx++;
clr_arg = argv[idx]->arg;
-
- if (! peer_group_lookup (bgp, clr_arg))
- {
- vty_out (vty, "%% No such peer-group%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
}
else if (argv_find (argv, argc, "WORD", &idx))
{
- if (peer_lookup_by_conf_if (bgp, argv[idx]->arg))
- {
- clr_sort = clear_peer;
- clr_arg = argv[idx]->arg;
- }
- else
- {
- vty_out (vty, "%% No such neighbor%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
+ clr_sort = clear_peer;
+ clr_arg = argv[idx]->arg;
}
else if (argv_find (argv, argc, "(1-4294967295)", &idx))
{
return CMD_SUCCESS;
}
+/*
+ * Return if we have a peer configured to use this afi/safi
+ */
+static int
+bgp_show_summary_afi_safi_peer_exists (struct bgp *bgp, int afi, int safi)
+{
+ struct listnode *node;
+ struct peer *peer;
+
+ for (ALL_LIST_ELEMENTS_RO (bgp->peer, node, peer))
+ {
+ if (!CHECK_FLAG (peer->flags, PEER_FLAG_CONFIG_NODE))
+ continue;
+
+ if (peer->afc[afi][safi])
+ return 1;
+ }
+
+ return 0;
+}
+
static void
bgp_show_summary_afi_safi (struct vty *vty, struct bgp *bgp, int afi, int safi,
u_char use_json, json_object *json)
int afi_wildcard = (afi == AFI_MAX);
int safi_wildcard = (safi == SAFI_MAX);
int is_wildcard = (afi_wildcard || safi_wildcard);
+ bool json_output = false;
+
if (use_json && is_wildcard)
vty_out (vty, "{%s", VTY_NEWLINE);
if (afi_wildcard)
safi = 1; /* SAFI_UNICAST */
while (safi < SAFI_MAX)
{
- if (is_wildcard)
+ if (bgp_show_summary_afi_safi_peer_exists (bgp, afi, safi))
{
- if (use_json)
+ json_output = true;
+ if (is_wildcard)
{
- json = json_object_new_object();
+ /*
+ * So limit output to those afi/safi pairs that
+ * actualy have something interesting in them
+ */
+ if (use_json)
+ {
+ json = json_object_new_object();
- if (! is_first)
- vty_out (vty, ",%s", VTY_NEWLINE);
- else
- is_first = 0;
+ if (! is_first)
+ vty_out (vty, ",%s", VTY_NEWLINE);
+ else
+ is_first = 0;
- vty_out(vty, "\"%s\":", afi_safi_json(afi, safi));
- }
- else
- {
- vty_out (vty, "%s%s Summary:%s",
- VTY_NEWLINE, afi_safi_print(afi, safi), VTY_NEWLINE);
+ vty_out(vty, "\"%s\":", afi_safi_json(afi, safi));
+ }
+ else
+ {
+ vty_out (vty, "%s%s Summary:%s",
+ VTY_NEWLINE, afi_safi_print(afi, safi), VTY_NEWLINE);
+ }
}
+ bgp_show_summary (vty, bgp, afi, safi, use_json, json);
}
- bgp_show_summary (vty, bgp, afi, safi, use_json, json);
safi++;
if (safi == SAFI_RESERVED_4 ||
safi == SAFI_RESERVED_5) /* handle special cases to match zebra.h */
}
afi++;
if (! afi_wildcard ||
- afi == AFI_ETHER) /* special case, not handled yet */
+ afi == AFI_L2VPN) /* special case, not handled yet */
afi = AFI_MAX;
}
if (use_json && is_wildcard)
vty_out (vty, "}%s", VTY_NEWLINE);
-
+ else if (use_json && !json_output)
+ vty_out (vty, "{}%s", VTY_NEWLINE);
}
static void
return "IPv4 Unicast";
else if (afi == AFI_IP && safi == SAFI_MULTICAST)
return "IPv4 Multicast";
+ else if (afi == AFI_IP && safi == SAFI_LABELED_UNICAST)
+ return "IPv4 labeled-unicast";
else if (afi == AFI_IP && safi == SAFI_MPLS_VPN)
return "IPv4 VPN";
else if (afi == AFI_IP && safi == SAFI_ENCAP)
return "IPv6 Unicast";
else if (afi == AFI_IP6 && safi == SAFI_MULTICAST)
return "IPv6 Multicast";
+ else if (afi == AFI_IP6 && safi == SAFI_LABELED_UNICAST)
+ return "IPv6 labeled-unicast";
else if (afi == AFI_IP6 && safi == SAFI_MPLS_VPN)
return "IPv6 VPN";
else if (afi == AFI_IP6 && safi == SAFI_ENCAP)
return "IPv6 Encap";
+ else if (afi == AFI_L2VPN && safi == SAFI_EVPN)
+ return "L2VPN EVPN";
else
return "Unknown";
}
+/*
+ * Please note that we have intentionally camelCased
+ * the return strings here. So if you want
+ * to use this function, please ensure you
+ * are doing this within json output
+ */
const char *
afi_safi_json (afi_t afi, safi_t safi)
{
if (afi == AFI_IP && safi == SAFI_UNICAST)
- return "IPv4Unicast";
+ return "ipv4Unicast";
else if (afi == AFI_IP && safi == SAFI_MULTICAST)
- return "IPv4Multicast";
+ return "ipv4Multicast";
+ else if (afi == AFI_IP && safi == SAFI_LABELED_UNICAST)
+ return "ipv4LabeledUnicast";
else if (afi == AFI_IP && safi == SAFI_MPLS_VPN)
- return "IPv4VPN";
+ return "ipv4Vpn";
else if (afi == AFI_IP && safi == SAFI_ENCAP)
- return "IPv4Encap";
+ return "ipv4Encap";
else if (afi == AFI_IP6 && safi == SAFI_UNICAST)
- return "IPv6Unicast";
+ return "ipv6Unicast";
else if (afi == AFI_IP6 && safi == SAFI_MULTICAST)
- return "IPv6Multicast";
+ return "ipv6Multicast";
+ else if (afi == AFI_IP6 && safi == SAFI_LABELED_UNICAST)
+ return "ipv6LabeledUnicast";
else if (afi == AFI_IP6 && safi == SAFI_MPLS_VPN)
- return "IPv6VPN";
+ return "ipv6Vpn";
else if (afi == AFI_IP6 && safi == SAFI_ENCAP)
- return "IPv6Encap";
+ return "ipv6Encap";
+ else if (afi == AFI_L2VPN && safi == SAFI_EVPN)
+ return "l2VpnEvpn";
else
return "Unknown";
}
json_object_string_add(json_neigh, "lastErrorCodeSubcode", errorcodesubcode_hexstr);
snprintf(errorcodesubcode_str, 255, "%s%s", code_str, subcode_str);
json_object_string_add(json_neigh, "lastNotificationReason", errorcodesubcode_str);
+ if (p->last_reset == PEER_DOWN_NOTIFY_RECEIVED
+ && p->notify.code == BGP_NOTIFY_CEASE
+ && (p->notify.subcode == BGP_NOTIFY_CEASE_ADMIN_SHUTDOWN
+ || p->notify.subcode == BGP_NOTIFY_CEASE_ADMIN_RESET)
+ && p->notify.length)
+ {
+ char msgbuf[1024];
+ const char *msg_str;
+
+ msg_str = bgp_notify_admin_message(msgbuf, sizeof(msgbuf),
+ (u_char*)p->notify.data, p->notify.length);
+ if (msg_str)
+ json_object_string_add(json_neigh, "lastShutdownDescription", msg_str);
+ }
}
}
else
vty_out (vty, "due to NOTIFICATION %s (%s%s)%s",
p->last_reset == PEER_DOWN_NOTIFY_SEND ? "sent" : "received",
code_str, subcode_str, VTY_NEWLINE);
+ if (p->last_reset == PEER_DOWN_NOTIFY_RECEIVED
+ && p->notify.code == BGP_NOTIFY_CEASE
+ && (p->notify.subcode == BGP_NOTIFY_CEASE_ADMIN_SHUTDOWN
+ || p->notify.subcode == BGP_NOTIFY_CEASE_ADMIN_RESET)
+ && p->notify.length)
+ {
+ char msgbuf[1024];
+ const char *msg_str;
+
+ msg_str = bgp_notify_admin_message(msgbuf, sizeof(msgbuf),
+ (u_char*)p->notify.data, p->notify.length);
+ if (msg_str)
+ vty_out (vty, " Message: \"%s\"%s", msg_str, VTY_NEWLINE);
+ }
}
else
{
int idx = 0;
- if (argv_find (argv, argc, "WORD", &idx))
- vrf = argv[idx]->arg;
+ if (argv_find (argv, argc, "view", &idx) ||
+ argv_find (argv, argc, "vrf", &idx))
+ vrf = argv[idx+1]->arg;
+ idx++;
if (argv_find (argv, argc, "A.B.C.D", &idx) ||
argv_find (argv, argc, "X:X::X:X", &idx) ||
argv_find (argv, argc, "WORD", &idx))
1,
};
+static struct cmd_node bgp_ipv4_labeled_unicast_node =
+{
+ BGP_IPV4L_NODE,
+ "%s(config-router-af)# ",
+ 1,
+};
+
static struct cmd_node bgp_ipv6_unicast_node =
{
BGP_IPV6_NODE,
1,
};
+static struct cmd_node bgp_ipv6_labeled_unicast_node =
+{
+ BGP_IPV6L_NODE,
+ "%s(config-router-af)# ",
+ 1,
+};
+
static struct cmd_node bgp_vpnv4_node =
{
BGP_VPNV4_NODE,
1
};
+static struct cmd_node bgp_evpn_node =
+{
+ BGP_EVPN_NODE,
+ "%s(config-router-evpn)# ",
+ 1
+};
+
static void community_list_vty (void);
void
install_node (&bgp_node, bgp_config_write);
install_node (&bgp_ipv4_unicast_node, NULL);
install_node (&bgp_ipv4_multicast_node, NULL);
+ install_node (&bgp_ipv4_labeled_unicast_node, NULL);
install_node (&bgp_ipv6_unicast_node, NULL);
install_node (&bgp_ipv6_multicast_node, NULL);
+ install_node (&bgp_ipv6_labeled_unicast_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. */
install_default (BGP_NODE);
install_default (BGP_IPV4_NODE);
install_default (BGP_IPV4M_NODE);
+ install_default (BGP_IPV4L_NODE);
install_default (BGP_IPV6_NODE);
install_default (BGP_IPV6M_NODE);
+ install_default (BGP_IPV6L_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. */
install_element (CONFIG_NODE, &bgp_multiple_instance_cmd);
install_element (BGP_IPV6_NODE, &bgp_maxpaths_cmd);
install_element (BGP_IPV6_NODE, &no_bgp_maxpaths_cmd);
install_element (BGP_NODE, &bgp_maxpaths_ibgp_cmd);
- install_element(BGP_NODE, &bgp_maxpaths_ibgp_cluster_cmd);
+ install_element (BGP_NODE, &bgp_maxpaths_ibgp_cluster_cmd);
install_element (BGP_NODE, &no_bgp_maxpaths_ibgp_cmd);
install_element (BGP_IPV4_NODE, &bgp_maxpaths_ibgp_cmd);
- install_element(BGP_IPV4_NODE, &bgp_maxpaths_ibgp_cluster_cmd);
+ install_element (BGP_IPV4_NODE, &bgp_maxpaths_ibgp_cluster_cmd);
install_element (BGP_IPV4_NODE, &no_bgp_maxpaths_ibgp_cmd);
install_element (BGP_IPV6_NODE, &bgp_maxpaths_ibgp_cmd);
- install_element(BGP_IPV6_NODE, &bgp_maxpaths_ibgp_cluster_cmd);
+ install_element (BGP_IPV6_NODE, &bgp_maxpaths_ibgp_cluster_cmd);
install_element (BGP_IPV6_NODE, &no_bgp_maxpaths_ibgp_cmd);
+ install_element (BGP_IPV4L_NODE, &bgp_maxpaths_cmd);
+ install_element (BGP_IPV4L_NODE, &no_bgp_maxpaths_cmd);
+ install_element (BGP_IPV6L_NODE, &bgp_maxpaths_cmd);
+ install_element (BGP_IPV6L_NODE, &no_bgp_maxpaths_cmd);
+
+ install_element (BGP_IPV4L_NODE, &bgp_maxpaths_ibgp_cmd);
+ install_element (BGP_IPV4L_NODE, &bgp_maxpaths_ibgp_cluster_cmd);
+ install_element (BGP_IPV4L_NODE, &no_bgp_maxpaths_ibgp_cmd);
+ install_element (BGP_IPV6L_NODE, &bgp_maxpaths_ibgp_cmd);
+ install_element (BGP_IPV6L_NODE, &bgp_maxpaths_ibgp_cluster_cmd);
+ install_element (BGP_IPV6L_NODE, &no_bgp_maxpaths_ibgp_cmd);
+
/* "timers bgp" commands. */
install_element (BGP_NODE, &bgp_timers_cmd);
install_element (BGP_NODE, &no_bgp_timers_cmd);
install_element (BGP_NODE, &neighbor_activate_cmd);
install_element (BGP_IPV4_NODE, &neighbor_activate_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_activate_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_activate_cmd);
install_element (BGP_IPV6_NODE, &neighbor_activate_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_activate_cmd);
+ install_element (BGP_IPV6L_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. */
install_element (BGP_NODE, &no_neighbor_activate_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_activate_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_activate_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_activate_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_activate_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_activate_cmd);
+ install_element (BGP_IPV6L_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.
* Long term we should only accept this command under BGP_NODE and not all of
install_element (BGP_NODE, &neighbor_set_peer_group_cmd);
install_element (BGP_IPV4_NODE, &neighbor_set_peer_group_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_set_peer_group_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_set_peer_group_cmd);
install_element (BGP_IPV6_NODE, &neighbor_set_peer_group_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_set_peer_group_cmd);
+ install_element (BGP_IPV6L_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_NODE, &no_neighbor_set_peer_group_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_set_peer_group_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_set_peer_group_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_set_peer_group_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_set_peer_group_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_set_peer_group_cmd);
+ install_element (BGP_IPV6L_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_NODE, &no_neighbor_soft_reconfiguration_cmd);
install_element (BGP_IPV4_NODE, &neighbor_soft_reconfiguration_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_soft_reconfiguration_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_soft_reconfiguration_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_soft_reconfiguration_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_soft_reconfiguration_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_soft_reconfiguration_cmd);
install_element (BGP_IPV6_NODE, &neighbor_soft_reconfiguration_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_soft_reconfiguration_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_soft_reconfiguration_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_soft_reconfiguration_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_soft_reconfiguration_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_soft_reconfiguration_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_soft_reconfiguration_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_soft_reconfiguration_cmd);
install_element (BGP_VPNV6_NODE, &neighbor_soft_reconfiguration_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_attr_unchanged_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_attr_unchanged_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_attr_unchanged_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_attr_unchanged_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_attr_unchanged_cmd);
install_element (BGP_IPV6_NODE, &neighbor_attr_unchanged_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_attr_unchanged_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_attr_unchanged_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_attr_unchanged_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_attr_unchanged_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_attr_unchanged_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_attr_unchanged_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_attr_unchanged_cmd);
install_element (BGP_VPNV6_NODE, &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);
+
/* "nexthop-local unchanged" commands */
install_element (BGP_IPV6_NODE, &neighbor_nexthop_local_unchanged_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_nexthop_local_unchanged_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_nexthop_self_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_nexthop_self_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_nexthop_self_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_nexthop_self_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_nexthop_self_cmd);
install_element (BGP_IPV6_NODE, &neighbor_nexthop_self_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_nexthop_self_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_nexthop_self_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_nexthop_self_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_nexthop_self_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_nexthop_self_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_nexthop_self_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_nexthop_self_cmd);
install_element (BGP_VPNV6_NODE, &neighbor_nexthop_self_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_nexthop_self_force_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_nexthop_self_force_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_nexthop_self_force_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_nexthop_self_force_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_nexthop_self_force_cmd);
install_element (BGP_IPV6_NODE, &neighbor_nexthop_self_force_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_nexthop_self_force_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_nexthop_self_force_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_nexthop_self_force_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_nexthop_self_force_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_nexthop_self_force_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_nexthop_self_force_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_nexthop_self_force_cmd);
install_element (BGP_VPNV6_NODE, &neighbor_nexthop_self_force_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_as_override_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_as_override_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_as_override_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_as_override_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_as_override_cmd);
install_element (BGP_IPV6_NODE, &neighbor_as_override_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_as_override_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_as_override_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_as_override_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_as_override_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_as_override_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_as_override_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_as_override_cmd);
install_element (BGP_VPNV6_NODE, &neighbor_as_override_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_remove_private_as_replace_as_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_remove_private_as_all_replace_as_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_remove_private_as_all_replace_as_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_remove_private_as_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_remove_private_as_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_remove_private_as_all_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_remove_private_as_all_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_remove_private_as_replace_as_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_remove_private_as_replace_as_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_remove_private_as_all_replace_as_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_remove_private_as_all_replace_as_cmd);
install_element (BGP_IPV6_NODE, &neighbor_remove_private_as_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_remove_private_as_cmd);
install_element (BGP_IPV6_NODE, &neighbor_remove_private_as_all_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_remove_private_as_replace_as_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_remove_private_as_all_replace_as_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_remove_private_as_all_replace_as_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_remove_private_as_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_remove_private_as_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_remove_private_as_all_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_remove_private_as_all_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_remove_private_as_replace_as_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_remove_private_as_replace_as_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_remove_private_as_all_replace_as_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_remove_private_as_all_replace_as_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_remove_private_as_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_remove_private_as_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_remove_private_as_all_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_send_community_type_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_send_community_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_send_community_type_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_send_community_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_send_community_type_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_send_community_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_send_community_type_cmd);
install_element (BGP_IPV6_NODE, &neighbor_send_community_cmd);
install_element (BGP_IPV6_NODE, &neighbor_send_community_type_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_send_community_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_send_community_type_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_send_community_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_send_community_type_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_send_community_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_send_community_type_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_send_community_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_send_community_type_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_send_community_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_send_community_type_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_send_community_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_route_reflector_client_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_route_reflector_client_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_route_reflector_client_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_route_reflector_client_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_route_reflector_client_cmd);
install_element (BGP_IPV6_NODE, &neighbor_route_reflector_client_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_route_reflector_client_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_route_reflector_client_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_route_reflector_client_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_route_reflector_client_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_route_reflector_client_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_route_reflector_client_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_route_reflector_client_cmd);
install_element (BGP_VPNV6_NODE, &neighbor_route_reflector_client_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_route_server_client_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_route_server_client_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_route_server_client_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_route_server_client_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_route_server_client_cmd);
install_element (BGP_IPV6_NODE, &neighbor_route_server_client_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_route_server_client_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_route_server_client_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_route_server_client_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_route_server_client_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_route_server_client_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_route_server_client_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_route_server_client_cmd);
install_element (BGP_VPNV6_NODE, &neighbor_route_server_client_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_addpath_tx_all_paths_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_addpath_tx_all_paths_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_addpath_tx_all_paths_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_addpath_tx_all_paths_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_addpath_tx_all_paths_cmd);
install_element (BGP_IPV6_NODE, &neighbor_addpath_tx_all_paths_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_addpath_tx_all_paths_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_addpath_tx_all_paths_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_addpath_tx_all_paths_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_addpath_tx_all_paths_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_addpath_tx_all_paths_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_addpath_tx_all_paths_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_addpath_tx_all_paths_cmd);
install_element (BGP_VPNV6_NODE, &neighbor_addpath_tx_all_paths_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_addpath_tx_bestpath_per_as_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_addpath_tx_bestpath_per_as_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_addpath_tx_bestpath_per_as_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_addpath_tx_bestpath_per_as_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_addpath_tx_bestpath_per_as_cmd);
install_element (BGP_IPV6_NODE, &neighbor_addpath_tx_bestpath_per_as_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_addpath_tx_bestpath_per_as_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_addpath_tx_bestpath_per_as_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_addpath_tx_bestpath_per_as_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_addpath_tx_bestpath_per_as_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_addpath_tx_bestpath_per_as_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_addpath_tx_bestpath_per_as_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_addpath_tx_bestpath_per_as_cmd);
install_element (BGP_VPNV6_NODE, &neighbor_addpath_tx_bestpath_per_as_cmd);
/* "neighbor shutdown" commands. */
install_element (BGP_NODE, &neighbor_shutdown_cmd);
install_element (BGP_NODE, &no_neighbor_shutdown_cmd);
+ install_element (BGP_NODE, &neighbor_shutdown_msg_cmd);
+ install_element (BGP_NODE, &no_neighbor_shutdown_msg_cmd);
/* "neighbor capability extended-nexthop" commands.*/
install_element (BGP_NODE, &neighbor_capability_enhe_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_capability_orf_prefix_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_capability_orf_prefix_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_capability_orf_prefix_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_capability_orf_prefix_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_capability_orf_prefix_cmd);
install_element (BGP_IPV6_NODE, &neighbor_capability_orf_prefix_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_capability_orf_prefix_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_capability_orf_prefix_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_capability_orf_prefix_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_capability_orf_prefix_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_capability_orf_prefix_cmd);
/* "neighbor capability dynamic" commands.*/
install_element (BGP_NODE, &neighbor_capability_dynamic_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_default_originate_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_default_originate_rmap_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_default_originate_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_default_originate_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_default_originate_rmap_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_default_originate_cmd);
install_element (BGP_IPV6_NODE, &neighbor_default_originate_cmd);
install_element (BGP_IPV6_NODE, &neighbor_default_originate_rmap_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_default_originate_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_default_originate_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_default_originate_rmap_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_default_originate_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_default_originate_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_default_originate_rmap_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_default_originate_cmd);
/* "neighbor port" commands. */
install_element (BGP_NODE, &neighbor_port_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_weight_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_weight_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_weight_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_weight_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_weight_cmd);
install_element (BGP_IPV6_NODE, &neighbor_weight_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_weight_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_weight_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_weight_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_weight_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_weight_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_weight_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_weight_cmd);
install_element (BGP_VPNV6_NODE, &neighbor_weight_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_distribute_list_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_distribute_list_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_distribute_list_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_distribute_list_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_distribute_list_cmd);
install_element (BGP_IPV6_NODE, &neighbor_distribute_list_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_distribute_list_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_distribute_list_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_distribute_list_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_distribute_list_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_distribute_list_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_distribute_list_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_distribute_list_cmd);
install_element (BGP_VPNV6_NODE, &neighbor_distribute_list_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_prefix_list_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_prefix_list_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_prefix_list_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_prefix_list_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_prefix_list_cmd);
install_element (BGP_IPV6_NODE, &neighbor_prefix_list_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_prefix_list_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_prefix_list_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_prefix_list_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_prefix_list_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_prefix_list_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_prefix_list_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_prefix_list_cmd);
install_element (BGP_VPNV6_NODE, &neighbor_prefix_list_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_filter_list_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_filter_list_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_filter_list_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_filter_list_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_filter_list_cmd);
install_element (BGP_IPV6_NODE, &neighbor_filter_list_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_filter_list_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_filter_list_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_filter_list_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_filter_list_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_filter_list_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_filter_list_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_filter_list_cmd);
install_element (BGP_VPNV6_NODE, &neighbor_filter_list_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_route_map_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_route_map_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_route_map_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_route_map_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_route_map_cmd);
install_element (BGP_IPV6_NODE, &neighbor_route_map_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_route_map_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_route_map_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_route_map_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_route_map_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_route_map_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_route_map_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_route_map_cmd);
install_element (BGP_VPNV6_NODE, &neighbor_route_map_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_unsuppress_map_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_unsuppress_map_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_unsuppress_map_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_unsuppress_map_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_unsuppress_map_cmd);
install_element (BGP_IPV6_NODE, &neighbor_unsuppress_map_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_unsuppress_map_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_unsuppress_map_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_unsuppress_map_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_unsuppress_map_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_unsuppress_map_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_unsuppress_map_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_unsuppress_map_cmd);
install_element (BGP_VPNV6_NODE, &neighbor_unsuppress_map_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_maximum_prefix_restart_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_maximum_prefix_threshold_restart_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_maximum_prefix_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_maximum_prefix_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_maximum_prefix_threshold_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_maximum_prefix_warning_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_maximum_prefix_threshold_warning_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_maximum_prefix_restart_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_maximum_prefix_threshold_restart_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_maximum_prefix_cmd);
install_element (BGP_IPV6_NODE, &neighbor_maximum_prefix_cmd);
install_element (BGP_IPV6_NODE, &neighbor_maximum_prefix_threshold_cmd);
install_element (BGP_IPV6_NODE, &neighbor_maximum_prefix_warning_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_maximum_prefix_restart_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_maximum_prefix_threshold_restart_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_maximum_prefix_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_maximum_prefix_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_maximum_prefix_threshold_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_maximum_prefix_warning_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_maximum_prefix_threshold_warning_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_maximum_prefix_restart_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_maximum_prefix_threshold_restart_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_maximum_prefix_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_maximum_prefix_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_maximum_prefix_threshold_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_maximum_prefix_warning_cmd);
install_element (BGP_IPV4_NODE, &no_neighbor_allowas_in_cmd);
install_element (BGP_IPV4M_NODE, &neighbor_allowas_in_cmd);
install_element (BGP_IPV4M_NODE, &no_neighbor_allowas_in_cmd);
+ install_element (BGP_IPV4L_NODE, &neighbor_allowas_in_cmd);
+ install_element (BGP_IPV4L_NODE, &no_neighbor_allowas_in_cmd);
install_element (BGP_IPV6_NODE, &neighbor_allowas_in_cmd);
install_element (BGP_IPV6_NODE, &no_neighbor_allowas_in_cmd);
install_element (BGP_IPV6M_NODE, &neighbor_allowas_in_cmd);
install_element (BGP_IPV6M_NODE, &no_neighbor_allowas_in_cmd);
+ install_element (BGP_IPV6L_NODE, &neighbor_allowas_in_cmd);
+ install_element (BGP_IPV6L_NODE, &no_neighbor_allowas_in_cmd);
install_element (BGP_VPNV4_NODE, &neighbor_allowas_in_cmd);
install_element (BGP_VPNV4_NODE, &no_neighbor_allowas_in_cmd);
install_element (BGP_VPNV6_NODE, &neighbor_allowas_in_cmd);
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. */
install_element (BGP_IPV4_NODE, &exit_address_family_cmd);
install_element (BGP_IPV4M_NODE, &exit_address_family_cmd);
+ install_element (BGP_IPV4L_NODE, &exit_address_family_cmd);
install_element (BGP_IPV6_NODE, &exit_address_family_cmd);
install_element (BGP_IPV6M_NODE, &exit_address_family_cmd);
+ install_element (BGP_IPV6L_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" */
install_element (ENABLE_NODE, &clear_ip_bgp_all_cmd);
int ret = community_list_unset (bgp_clist, cl_name_or_number, str, direct, style, delete_all);
+ XFREE (MTYPE_TMP, str);
+
if (ret < 0)
{
community_list_perror (vty, ret);
int ret = community_list_unset (bgp_clist, cl_name_or_number, str, direct, style, delete_all);
+ XFREE (MTYPE_TMP, str);
+
if (ret < 0)
{
community_list_perror (vty, ret);