Merge branch 'master' of https://github.com/dwalton76/frr into bgpd-ipv4-plus-label-misc3

Conflicts:
	bgpd/bgp_route.c
	bgpd/bgp_zebra.c
This commit is contained in:
Daniel Walton 2017-07-10 13:06:19 +00:00
commit dfd8121281
25 changed files with 123 additions and 361 deletions

View File

@ -617,8 +617,7 @@ DEFUN (no_router_babel,
"no router babel",
NO_STR
"Disable a routing process\n"
"Remove Babel instance command\n"
"No attributes\n")
"Remove Babel instance command\n")
{
if(babel_routing_process)
babel_clean_routing_process();

View File

@ -232,12 +232,6 @@ bgp_exit (int status)
vnc_zebra_destroy();
#endif
bgp_zebra_destroy();
if (bgp_nexthop_buf)
stream_free (bgp_nexthop_buf);
if (bgp_ifindices_buf)
stream_free (bgp_ifindices_buf);
if (bgp_label_buf)
stream_free (bgp_label_buf);
/* reverse bgp_master_init */
if (bm->master)

View File

@ -1379,7 +1379,6 @@ DEFUN (bgp_update_delay_establish_wait,
"update-delay (0-3600) (1-3600)",
"Force initial delay for best-path and updates\n"
"Seconds\n"
"Wait for peers to be established\n"
"Seconds\n")
{
int idx_number = 1;
@ -1394,7 +1393,7 @@ DEFUN (no_bgp_update_delay,
NO_STR
"Force initial delay for best-path and updates\n"
"Seconds\n"
"Wait for peers to be established\n")
"Seconds\n")
{
return bgp_update_delay_deconfig_vty(vty);
}
@ -6237,11 +6236,10 @@ DEFUN_NOSH (address_family_vpnv6,
DEFUN_NOSH (address_family_evpn,
address_family_evpn_cmd,
"address-family <l2vpn evpn>",
"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")
"Address Family\n"
"Address Family modifier\n")
{
vty->node = BGP_EVPN_NODE;
return CMD_SUCCESS;
@ -9619,8 +9617,7 @@ DEFUN (show_bgp_updgrps_afi_adj,
"Detailed info about dynamic update groups\n"
"Advertisement queue\n"
"Announced routes\n"
"Packet queue\n"
"Specific subgroup info wanted for\n")
"Packet queue\n")
{
int idx_afi = 2;
int idx_safi = 3;
@ -9725,8 +9722,7 @@ DEFUN (show_bgp_updgrps_afi_adj_s,
"Specific subgroup to display info for\n"
"Advertisement queue\n"
"Announced routes\n"
"Packet queue\n"
"Specific subgroup info wanted for\n")
"Packet queue\n")
{
int idx_afi = 2;
int idx_safi = 3;
@ -12171,8 +12167,7 @@ DEFUN (ip_lcommunity_list_standard,
LCOMMUNITY_LIST_STR
"Large Community list number (standard)\n"
"Specify large community to reject\n"
"Specify large community to accept\n"
LCOMMUNITY_VAL_STR)
"Specify large community to accept\n")
{
return lcommunity_list_set_vty (vty, argc, argv, LARGE_COMMUNITY_LIST_STANDARD, 0);
}

View File

@ -1222,8 +1222,7 @@ bgp_zebra_announce (struct bgp_node *rn, struct prefix *p, struct bgp_info *info
u_char distance;
struct peer *peer;
struct bgp_info *mpinfo;
size_t oldsize, newsize;
u_int32_t nhcount, metric;
u_int32_t metric;
struct bgp_info local_info;
struct bgp_info *info_cp = &local_info;
route_tag_t tag;
@ -1270,8 +1269,6 @@ bgp_zebra_announce (struct bgp_node *rn, struct prefix *p, struct bgp_info *info
SET_FLAG (flags, ZEBRA_FLAG_INTERNAL);
nhcount = 1 + bgp_info_mpath_count (info);
if (p->family == AF_INET && !BGP_ATTR_NEXTHOP_AFI_IP6(info->attr))
{
struct zapi_ipv4 api;
@ -1281,78 +1278,17 @@ bgp_zebra_announce (struct bgp_node *rn, struct prefix *p, struct bgp_info *info
int has_valid_label = 0;
/* resize nexthop buffer size if necessary */
if ((oldsize = stream_get_size (bgp_nexthop_buf)) <
(sizeof (struct in_addr *) * nhcount))
{
newsize = sizeof (struct in_addr *) * nhcount;
newsize = stream_resize (bgp_nexthop_buf, newsize);
if (newsize == oldsize)
{
zlog_err ("can't resize nexthop buffer");
return;
}
}
stream_reset (bgp_nexthop_buf);
nexthop = NULL;
/* For labeled unicast, each nexthop has a label too. Resize label
* buffer, if required.
*/
if (safi == SAFI_UNICAST)
{
if ((oldsize = stream_get_size (bgp_label_buf)) <
(sizeof (unsigned int) * nhcount))
{
newsize = (sizeof (unsigned int) * nhcount);
newsize = stream_resize (bgp_label_buf, newsize);
if (newsize == oldsize)
{
zlog_err ("can't resize label buffer");
return;
}
}
stream_reset (bgp_label_buf);
}
/* Metric is currently based on the best-path only. */
metric = info->attr->med;
if (bgp->table_map[afi][safi].name)
{
BGP_INFO_ATTR_BUF_INIT();
/* Copy info and attributes, so the route-map apply doesn't modify the
BGP route info. */
BGP_INFO_ATTR_BUF_COPY(info, info_cp);
if (bgp_table_map_apply(bgp->table_map[afi][safi].map, p, info_cp))
{
metric = info_cp->attr->med;
nexthop = &info_cp->attr->nexthop;
if (info_cp->attr->extra)
tag = info_cp->attr->extra->tag;
}
BGP_INFO_ATTR_BUF_FREE(info_cp);
}
else
{
nexthop = &info->attr->nexthop;
}
if (nexthop)
{
stream_put (bgp_nexthop_buf, &nexthop, sizeof (struct in_addr *));
valid_nh_count++;
if (info->extra && bgp_is_valid_label(&info->extra->label))
{
has_valid_label = 1;
label = label_pton(&info->extra->label);
stream_put (bgp_label_buf, &label, sizeof (mpls_label_t));
}
}
for (mpinfo = bgp_info_mpath_first (info); mpinfo;
mpinfo = bgp_info_mpath_next (mpinfo))
/* Metric is currently based on the best-path only */
metric = info->attr->med;
for (mpinfo = info ; mpinfo; mpinfo = bgp_info_mpath_next (mpinfo))
{
nexthop = NULL;
@ -1362,13 +1298,19 @@ bgp_zebra_announce (struct bgp_node *rn, struct prefix *p, struct bgp_info *info
BGP route info. */
BGP_INFO_ATTR_BUF_COPY(mpinfo, info_cp);
if (bgp_table_map_apply(bgp->table_map[afi][safi].map, p, info_cp))
{
if (mpinfo == info)
{
/* Metric is currently based on the best-path only */
metric = info_cp->attr->med;
tag = info_cp->attr->extra->tag;
}
nexthop = &info_cp->attr->nexthop;
}
BGP_INFO_ATTR_BUF_FREE(info_cp);
}
else
{
nexthop = &mpinfo->attr->nexthop;
}
if (nexthop == NULL)
continue;
@ -1469,110 +1411,20 @@ bgp_zebra_announce (struct bgp_node *rn, struct prefix *p, struct bgp_info *info
char buf[2][INET6_ADDRSTRLEN];
int has_valid_label = 0;
/* resize nexthop buffer size if necessary */
if ((oldsize = stream_get_size (bgp_nexthop_buf)) <
(sizeof (struct in6_addr *) * nhcount))
{
newsize = (sizeof (struct in6_addr *) * nhcount);
newsize = stream_resize (bgp_nexthop_buf, newsize);
if (newsize == oldsize)
{
zlog_err ("can't resize nexthop buffer");
return;
}
}
stream_reset (bgp_nexthop_buf);
/* resize ifindices buffer size if necessary */
if ((oldsize = stream_get_size (bgp_ifindices_buf)) <
(sizeof (unsigned int) * nhcount))
{
newsize = (sizeof (unsigned int) * nhcount);
newsize = stream_resize (bgp_ifindices_buf, newsize);
if (newsize == oldsize)
{
zlog_err ("can't resize nexthop buffer");
return;
}
}
stream_reset (bgp_ifindices_buf);
/* For labeled unicast, each nexthop has a label too. Resize label
* buffer, if required.
*/
if (safi == SAFI_UNICAST)
{
if ((oldsize = stream_get_size (bgp_label_buf)) <
(sizeof (unsigned int) * nhcount))
{
newsize = (sizeof (unsigned int) * nhcount);
newsize = stream_resize (bgp_label_buf, newsize);
if (newsize == oldsize)
{
zlog_err ("can't resize label buffer");
return;
}
}
stream_reset (bgp_label_buf);
}
ifindex = 0;
nexthop = NULL;
assert (info->attr->extra);
/* Metric is currently based on the best-path only. */
metric = info->attr->med;
if (bgp->table_map[afi][safi].name)
{
BGP_INFO_ATTR_BUF_INIT();
/* Copy info and attributes, so the route-map apply doesn't modify the
BGP route info. */
BGP_INFO_ATTR_BUF_COPY(info, info_cp);
if (bgp_table_map_apply(bgp->table_map[afi][safi].map, p, info_cp))
{
metric = info_cp->attr->med;
nexthop = bgp_info_to_ipv6_nexthop(info_cp);
if (info_cp->attr->extra)
tag = info_cp->attr->extra->tag;
}
BGP_INFO_ATTR_BUF_FREE(info_cp);
}
else
{
nexthop = bgp_info_to_ipv6_nexthop(info);
}
if (nexthop)
{
if (info->attr->extra->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL)
if (info->peer->nexthop.ifp)
ifindex = info->peer->nexthop.ifp->ifindex;
if (!ifindex)
{
if (info->peer->conf_if || info->peer->ifname)
ifindex = if_nametoindex (info->peer->conf_if ? info->peer->conf_if : info->peer->ifname);
else if (info->peer->nexthop.ifp)
ifindex = info->peer->nexthop.ifp->ifindex;
}
stream_put (bgp_nexthop_buf, &nexthop, sizeof (struct in6_addr *));
stream_put (bgp_ifindices_buf, &ifindex, sizeof (unsigned int));
if (info->extra && bgp_is_valid_label(&info->extra->label))
{
has_valid_label = 1;
label = label_pton(&info->extra->label);
stream_put (bgp_label_buf, &label, sizeof (mpls_label_t));
}
valid_nh_count++;
}
for (mpinfo = bgp_info_mpath_first (info); mpinfo;
mpinfo = bgp_info_mpath_next (mpinfo))
metric = info->attr->med;
for (mpinfo = info ; mpinfo; mpinfo = bgp_info_mpath_next (mpinfo))
{
ifindex = 0;
nexthop = NULL;
@ -1583,18 +1435,24 @@ bgp_zebra_announce (struct bgp_node *rn, struct prefix *p, struct bgp_info *info
BGP route info. */
BGP_INFO_ATTR_BUF_COPY(mpinfo, info_cp);
if (bgp_table_map_apply(bgp->table_map[afi][safi].map, p, info_cp))
{
if (mpinfo == info)
{
metric = info_cp->attr->med;
tag = info_cp->attr->extra->tag;
}
nexthop = bgp_info_to_ipv6_nexthop(info_cp);
}
BGP_INFO_ATTR_BUF_FREE(info_cp);
}
else
{
nexthop = bgp_info_to_ipv6_nexthop(mpinfo);
}
if (nexthop == NULL)
continue;
if (mpinfo->attr->extra->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL)
if ((mpinfo == info) &&
mpinfo->attr->extra->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL)
if (mpinfo->peer->nexthop.ifp)
ifindex = mpinfo->peer->nexthop.ifp->ifindex;
@ -2276,14 +2134,22 @@ bgp_zebra_init (struct thread_master *master)
zclient->import_check_update = bgp_read_import_check_update;
zclient->fec_update = bgp_read_fec_update;
bgp_nexthop_buf = stream_new(BGP_NEXTHOP_BUF_SIZE);
bgp_ifindices_buf = stream_new(BGP_IFINDICES_BUF_SIZE);
bgp_label_buf = stream_new(BGP_LABEL_BUF_SIZE);
bgp_nexthop_buf = stream_new(multipath_num * sizeof (struct in6_addr));
bgp_ifindices_buf = stream_new(multipath_num * sizeof (unsigned int));
bgp_label_buf = stream_new(multipath_num * sizeof (unsigned int));
}
void
bgp_zebra_destroy(void)
{
if (bgp_nexthop_buf)
stream_free (bgp_nexthop_buf);
if (bgp_ifindices_buf)
stream_free (bgp_ifindices_buf);
if (bgp_label_buf)
stream_free (bgp_label_buf);
if (zclient == NULL)
return;
zclient_stop(zclient);

View File

@ -21,14 +21,6 @@
#ifndef _QUAGGA_BGP_ZEBRA_H
#define _QUAGGA_BGP_ZEBRA_H
#define BGP_NEXTHOP_BUF_SIZE (8 * sizeof (struct in_addr *))
#define BGP_IFINDICES_BUF_SIZE (8 * sizeof (unsigned int))
#define BGP_LABEL_BUF_SIZE (8 * sizeof (unsigned int))
extern struct stream *bgp_nexthop_buf;
extern struct stream *bgp_ifindices_buf;
extern struct stream *bgp_label_buf;
extern void bgp_zebra_init (struct thread_master *master);
extern void bgp_zebra_destroy (void);
extern int bgp_if_update_all (void);

View File

@ -7265,7 +7265,7 @@ bgp_config_write_family_header (struct vty *vty, afi_t afi, safi_t safi,
if (*write)
return;
vty_outln (vty, " !%s address-family ", VTYNL);
vty_out (vty, " !%s address-family ", VTYNL);
if (afi == AFI_IP)
{

View File

@ -1313,9 +1313,9 @@ DEFUN (vnc_nve_group_redist_bgpdirect_no_prefixlist,
NO_STR
"Redistribute from other protocol\n"
"Redistribute from BGP directly\n"
"Disable redistribute filter\n"
"IPv4 routes\n"
"IPv6 routes\n" "Prefix-list for filtering redistributed routes\n")
"IPv6 routes\n"
"Prefix-list for filtering redistributed routes\n")
{
VTY_DECLVAR_CONTEXT(bgp, bgp);
VTY_DECLVAR_CONTEXT_SUB(rfapi_nve_group_cfg, rfg)
@ -1412,7 +1412,6 @@ DEFUN (vnc_nve_group_redist_bgpdirect_no_routemap,
NO_STR
"Redistribute from other protocols\n"
"Redistribute from BGP directly\n"
"Disable redistribute filter\n"
"Route-map for filtering redistributed routes\n")
{
VTY_DECLVAR_CONTEXT(bgp, bgp);
@ -2076,7 +2075,6 @@ DEFUN (vnc_nve_export_prefixlist,
"Export to other protocols\n"
"Export to BGP\n"
"Export to Zebra (experimental)\n"
"Filters, used in 'registering-nve' export mode\n"
"IPv4 prefixes\n"
"IPv6 prefixes\n"
"Prefix-list for filtering exported routes\n" "Prefix list name\n")
@ -2178,7 +2176,6 @@ DEFUN (vnc_nve_export_routemap,
"Export to other protocols\n"
"Export to BGP\n"
"Export to Zebra (experimental)\n"
"Filters, used in 'registering-nve' export mode\n"
"Route-map for filtering exported routes\n" "Route map name\n")
{
VTY_DECLVAR_CONTEXT(bgp, bgp);
@ -3918,7 +3915,6 @@ DEFUN (vnc_l2_group_no_labels,
vnc_l2_group_no_labels_cmd,
"no labels LABELLIST...",
NO_STR
"Remove label values associated with L2 group\n"
"Specify label values associated with L2 group\n"
"Space separated list of label values <0-1048575>\n")
{

View File

@ -2672,8 +2672,7 @@ DEFUN (add_vnc_prefix_cost_life,
"Administrative cost [default: 255]\n"
"Administrative cost\n"
"Registration lifetime [default: infinite]\n"
"Lifetime value in seconds\n"
"[local-next-hop (A.B.C.D|X:X::X:X)] [local-cost <0-255>]\n")
"Lifetime value in seconds\n")
{
/* pfx vn un cost life */
return register_add (vty, argv[3], argv[5], argv[7], argv[9], argv[11],
@ -2698,8 +2697,7 @@ DEFUN (add_vnc_prefix_life_cost,
"Registration lifetime [default: infinite]\n"
"Lifetime value in seconds\n"
"Administrative cost [default: 255]\n"
"Administrative cost\n"
"[local-next-hop (A.B.C.D|X:X::X:X)] [local-cost <0-255>]\n")
"Administrative cost\n")
{
/* pfx vn un cost life */
return register_add (vty, argv[3], argv[5], argv[7], argv[11], argv[9],
@ -2722,8 +2720,7 @@ DEFUN (add_vnc_prefix_cost,
"UN IPv4 interface address\n"
"UN IPv6 interface address\n"
"Administrative cost [default: 255]\n"
"Administrative cost\n"
"[local-next-hop (A.B.C.D|X:X::X:X)] [local-cost <0-255>]\n")
"Administrative cost\n")
{
/* pfx vn un cost life */
return register_add (vty, argv[3], argv[5], argv[7], argv[9], NULL,
@ -2746,8 +2743,7 @@ DEFUN (add_vnc_prefix_life,
"UN IPv4 interface address\n"
"UN IPv6 interface address\n"
"Registration lifetime [default: infinite]\n"
"Lifetime value in seconds\n"
"[local-next-hop (A.B.C.D|X:X::X:X)] [local-cost <0-255>]\n")
"Lifetime value in seconds\n")
{
/* pfx vn un cost life */
return register_add (vty, argv[3], argv[5], argv[7], NULL, argv[9],
@ -2768,8 +2764,7 @@ DEFUN (add_vnc_prefix,
"VN IPv6 interface address\n"
"UN address of NVE\n"
"UN IPv4 interface address\n"
"UN IPv6 interface address\n"
"[local-next-hop (A.B.C.D|X:X::X:X)] [local-cost <0-255>]\n")
"UN IPv6 interface address\n")
{
/* pfx vn un cost life */
return register_add (vty, argv[3], argv[5], argv[7], NULL, NULL,
@ -4064,7 +4059,6 @@ DEFUN (clear_vnc_mac_vn_un,
"VNI keyword\n"
"Any virtual network identifier\n"
"Virtual network identifier\n"
"Virtual network identifier\n"
"VN address of NVE\n"
"All VN addresses\n"
"VN IPv4 interface address\n"

View File

@ -135,9 +135,9 @@ other settings)
### Install the init.d service
sudo install -m 755 tools/frr /etc/init.d/frr
sudo install -m 644 cumulus/etc/frr/daemons /etc/frr/daemons
sudo install -m 644 cumulus/etc/frr/daemons.conf /etc/frr/daemons.conf
sudo install -m 644 -o frr -g frr cumulus/etc/frr/vtysh.conf /etc/frr/vtysh.conf
sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons
sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf
sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
### Enable daemons
Edit `/etc/frr/daemons` and change the value from "no" to "yes" for those daemons you want to start by systemd.

View File

@ -95,9 +95,9 @@ other settings)
### Install the init.d service
sudo install -m 755 tools/frr /etc/init.d/frr
sudo install -m 644 cumulus/etc/frr/daemons /etc/frr/daemons
sudo install -m 644 cumulus/etc/frr/daemons.conf /etc/frr/daemons.conf
sudo install -m 644 -o frr -g frr cumulus/etc/frr/vtysh.conf /etc/frr/vtysh.conf
sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons
sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf
sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
### Enable daemons

View File

@ -117,11 +117,11 @@ Add the following lines to `/etc/modules-load.d/modules.conf`:
### Install the systemd service
sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service
sudo install -m 644 cumulus/etc/default/frr /etc/default/frr
sudo install -m 644 cumulus/etc/frr/daemons /etc/frr/daemons
sudo install -m 644 tools/etc/default/frr /etc/default/frr
sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons
sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf
sudo install -m 644 tools/etc/frr/frr.conf /etc/frr/frr.conf
sudo install -m 644 -o frr -g frr cumulus/etc/frr/vtysh.conf /etc/frr/vtysh.conf
sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
### Enable daemons

View File

@ -673,7 +673,6 @@ DEFUN (isis_hello_interval,
"isis hello-interval (1-600)",
"IS-IS commands\n"
"Set Hello interval\n"
"Hello interval value\n"
"Holdtime 1 seconds, interval depends on multiplier\n")
{
int idx_number = 2;
@ -721,7 +720,6 @@ DEFUN (isis_hello_interval_l1,
"isis hello-interval (1-600) level-1",
"IS-IS commands\n"
"Set Hello interval\n"
"Hello interval value\n"
"Holdtime 1 second, interval depends on multiplier\n"
"Specify hello-interval for level-1 IIHs\n")
{
@ -769,7 +767,6 @@ DEFUN (isis_hello_interval_l2,
"isis hello-interval (1-600) level-2",
"IS-IS commands\n"
"Set Hello interval\n"
"Hello interval value\n"
"Holdtime 1 second, interval depends on multiplier\n"
"Specify hello-interval for level-2 IIHs\n")
{
@ -958,8 +955,7 @@ DEFUN (isis_hello_padding,
"isis hello padding",
"IS-IS commands\n"
"Add padding to IS-IS hello packets\n"
"Pad hello packets\n"
"<cr>\n")
"Pad hello packets\n")
{
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
@ -976,8 +972,7 @@ DEFUN (no_isis_hello_padding,
NO_STR
"IS-IS commands\n"
"Add padding to IS-IS hello packets\n"
"Pad hello packets\n"
"<cr>\n")
"Pad hello packets\n")
{
struct isis_circuit *circuit = isis_circuit_lookup (vty);
if (!circuit)
@ -1431,8 +1426,7 @@ DEFUN (no_metric_style,
DEFUN (set_overload_bit,
set_overload_bit_cmd,
"set-overload-bit",
"Set overload bit to avoid any transit traffic\n"
"Set overload bit\n")
"Set overload bit to avoid any transit traffic\n")
{
VTY_DECLVAR_CONTEXT (isis_area, area);
@ -1455,8 +1449,7 @@ DEFUN (no_set_overload_bit,
DEFUN (set_attached_bit,
set_attached_bit_cmd,
"set-attached-bit",
"Set attached bit to identify as L1/L2 router for inter-area traffic\n"
"Set attached bit\n")
"Set attached bit to identify as L1/L2 router for inter-area traffic\n")
{
VTY_DECLVAR_CONTEXT (isis_area, area);

View File

@ -175,8 +175,7 @@ config_write_agentx (struct vty *vty)
DEFUN (agentx_enable,
agentx_enable_cmd,
"agentx",
"SNMP AgentX protocol settings\n"
"SNMP AgentX settings\n")
"SNMP AgentX protocol settings\n")
{
if (!agentx_enabled)
{
@ -194,8 +193,7 @@ DEFUN (no_agentx,
no_agentx_cmd,
"no agentx",
NO_STR
"SNMP AgentX protocol settings\n"
"SNMP AgentX settings\n")
"SNMP AgentX protocol settings\n")
{
if (!agentx_enabled) return CMD_SUCCESS;
vty_outln (vty, "SNMP AgentX support cannot be disabled once enabled");

View File

@ -2200,7 +2200,6 @@ DEFUN (no_config_log_file,
"Logging control\n"
"Cancel logging to file\n"
"Logging file name\n"
"Logging file name\n"
"Logging level\n")
{
zlog_reset_file ();

View File

@ -443,6 +443,14 @@ terminate_graph (CMD_YYLTYPE *locp, struct parser_ctx *ctx,
struct graph_node *end_element_node =
graph_new_node (ctx->graph, element, NULL);
if (ctx->docstr && strlen (ctx->docstr) > 1) {
zlog_debug ("Excessive docstring while parsing '%s'", ctx->el->string);
zlog_debug ("----------");
while (ctx->docstr && ctx->docstr[1] != '\0')
zlog_debug ("%s", strsep(&ctx->docstr, "\n"));
zlog_debug ("----------\n");
}
graph_add_edge (finalnode, end_token_node);
graph_add_edge (end_token_node, end_element_node);
}

View File

@ -1736,9 +1736,7 @@ DEFPY (show_ipv6_prefix_list,
PREFIX_LIST_STR
"Name of a prefix list\n"
"sequence number of an entry\n"
"Sequence number\n"
"Lookup longer prefix\n"
"First matched prefix\n")
"Sequence number\n")
{
enum display_type dtype = normal_display;
if (dseq)

View File

@ -107,7 +107,7 @@ vty_out_variadic (struct vty *vty, const char *format, va_list args)
{
/* Try to write to initial buffer. */
va_copy (cp, args);
len = vsnprintf (buf, sizeof(buf), format, args);
len = vsnprintf (buf, sizeof(buf), format, cp);
va_end (cp);
/* Initial buffer is not enough. */
@ -124,7 +124,9 @@ vty_out_variadic (struct vty *vty, const char *format, va_list args)
if (! p)
return -1;
len = vsnprintf (p, size, format, args);
va_copy (cp, args);
len = vsnprintf (p, size, format, cp);
va_end (cp);
if (len > -1 && len < size)
break;

View File

@ -1729,9 +1729,7 @@ DEFUN (no_ipv6_ospf6_network,
NO_STR
IP6_STR
OSPF6_STR
"Network type\n"
"Default to whatever interface type system specifies"
)
"Set default network type\n")
{
VTY_DECLVAR_CONTEXT(interface, ifp);
struct ospf6_interface *oi;

View File

@ -697,7 +697,6 @@ DEFUN (ospf6_stub_router_admin,
ospf6_stub_router_admin_cmd,
"stub-router administrative",
"Make router a stub router\n"
"Advertise inability to be a transit router\n"
"Administratively applied, for an indefinite period\n")
{
struct listnode *node;
@ -722,7 +721,6 @@ DEFUN (no_ospf6_stub_router_admin,
"no stub-router administrative",
NO_STR
"Make router a stub router\n"
"Advertise ability to be a transit router\n"
"Administratively applied, for an indefinite period\n")
{
struct listnode *node;

View File

@ -7095,8 +7095,7 @@ DEFUN (ospf_redistribute_source,
"Metric for redistributed routes\n"
"OSPF default metric\n"
"OSPF exterior metric type for redistributed routes\n"
"Set OSPF External Type 1 metrics\n"
"Set OSPF External Type 2 metrics\n"
"Set OSPF External Type 1/2 metrics\n"
"Route map reference\n"
"Pointer to route-map entries\n")
{
@ -7147,8 +7146,7 @@ DEFUN (no_ospf_redistribute_source,
"Metric for redistributed routes\n"
"OSPF default metric\n"
"OSPF exterior metric type for redistributed routes\n"
"Set OSPF External Type 1 metrics\n"
"Set OSPF External Type 2 metrics\n"
"Set OSPF External Type 1/2 metrics\n"
"Route map reference\n"
"Pointer to route-map entries\n")
{
@ -7179,8 +7177,7 @@ DEFUN (ospf_redistribute_instance_source,
"Metric for redistributed routes\n"
"OSPF default metric\n"
"OSPF exterior metric type for redistributed routes\n"
"Set OSPF External Type 1 metrics\n"
"Set OSPF External Type 2 metrics\n"
"Set OSPF External Type 1/2 metrics\n"
"Route map reference\n"
"Pointer to route-map entries\n")
{
@ -7251,8 +7248,7 @@ DEFUN (no_ospf_redistribute_instance_source,
"Metric for redistributed routes\n"
"OSPF default metric\n"
"OSPF exterior metric type for redistributed routes\n"
"Set OSPF External Type 1 metrics\n"
"Set OSPF External Type 2 metrics\n"
"Set OSPF External Type 1/2 metrics\n"
"Route map reference\n"
"Pointer to route-map entries\n")
{
@ -7345,8 +7341,7 @@ DEFUN (ospf_default_information_originate,
"OSPF default metric\n"
"OSPF metric\n"
"OSPF metric type for default routes\n"
"Set OSPF External Type 1 metrics\n"
"Set OSPF External Type 2 metrics\n"
"Set OSPF External Type 1/2 metrics\n"
"Route map reference\n"
"Pointer to route-map entries\n")
{
@ -7392,8 +7387,7 @@ DEFUN (no_ospf_default_information_originate,
"OSPF default metric\n"
"OSPF metric\n"
"OSPF metric type for default routes\n"
"Set OSPF External Type 1 metrics\n"
"Set OSPF External Type 2 metrics\n"
"Set OSPF External Type 1/2 metrics\n"
"Route map reference\n"
"Pointer to route-map entries\n")
{

View File

@ -4256,7 +4256,6 @@ DEFUN_HIDDEN (no_ip_multicast_routing,
"no ip multicast-routing",
NO_STR
IP_STR
"Global IP configuration subcommands\n"
"Enable IP multicast forwarding\n")
{
vty_outln (vty,
@ -5732,7 +5731,6 @@ DEFUN (debug_ssmpingd,
debug_ssmpingd_cmd,
"debug ssmpingd",
DEBUG_STR
DEBUG_PIM_STR
DEBUG_SSMPINGD_STR)
{
PIM_DO_DEBUG_SSMPINGD;
@ -5744,7 +5742,6 @@ DEFUN (no_debug_ssmpingd,
"no debug ssmpingd",
NO_STR
DEBUG_STR
DEBUG_PIM_STR
DEBUG_SSMPINGD_STR)
{
PIM_DONT_DEBUG_SSMPINGD;

View File

@ -1327,8 +1327,7 @@ DEFUN (ip_rip_receive_version,
"Routing Information Protocol\n"
"Advertisement reception\n"
"Version control\n"
"RIP version 1\n"
"RIP version 2\n"
"RIP version\n"
"None\n")
{
VTY_DECLVAR_CONTEXT(interface, ifp);
@ -1357,31 +1356,13 @@ DEFUN (ip_rip_receive_version,
DEFUN (ip_rip_receive_version_1,
ip_rip_receive_version_1_cmd,
"ip rip receive version (1-1) (2-2)",
"ip rip receive version <1 2|2 1>",
IP_STR
"Routing Information Protocol\n"
"Advertisement reception\n"
"Version control\n"
"RIP version 1\n"
"RIP version 2\n")
{
VTY_DECLVAR_CONTEXT(interface, ifp);
struct rip_interface *ri;
ri = ifp->info;
/* Version 1 and 2. */
ri->ri_receive = RI_RIP_VERSION_1_AND_2;
return CMD_SUCCESS;
}
DEFUN (ip_rip_receive_version_2,
ip_rip_receive_version_2_cmd,
"ip rip receive version (2-2) (1-1)",
IP_STR
"Routing Information Protocol\n"
"Advertisement reception\n"
"Version control\n"
"RIP version 2\n"
"RIP version 2\n"
"RIP version 1\n")
{
@ -1403,8 +1384,7 @@ DEFUN (no_ip_rip_receive_version,
"Routing Information Protocol\n"
"Advertisement reception\n"
"Version control\n"
"Version 1\n"
"Version 2\n")
"RIP version\n")
{
VTY_DECLVAR_CONTEXT(interface, ifp);
struct rip_interface *ri;
@ -1423,8 +1403,7 @@ DEFUN (ip_rip_send_version,
"Routing Information Protocol\n"
"Advertisement transmission\n"
"Version control\n"
"RIP version 1\n"
"RIP version 2\n")
"RIP version\n")
{
VTY_DECLVAR_CONTEXT(interface, ifp);
int idx_type = 4;
@ -1448,31 +1427,13 @@ DEFUN (ip_rip_send_version,
DEFUN (ip_rip_send_version_1,
ip_rip_send_version_1_cmd,
"ip rip send version (1-1) (2-2)",
"ip rip send version <1 2|2 1>",
IP_STR
"Routing Information Protocol\n"
"Advertisement transmission\n"
"Version control\n"
"RIP version 1\n"
"RIP version 2\n")
{
VTY_DECLVAR_CONTEXT(interface, ifp);
struct rip_interface *ri;
ri = ifp->info;
/* Version 1 and 2. */
ri->ri_send = RI_RIP_VERSION_1_AND_2;
return CMD_SUCCESS;
}
DEFUN (ip_rip_send_version_2,
ip_rip_send_version_2_cmd,
"ip rip send version (2-2) (1-1)",
IP_STR
"Routing Information Protocol\n"
"Advertisement transmission\n"
"Version control\n"
"RIP version 2\n"
"RIP version 2\n"
"RIP version 1\n")
{
@ -1494,8 +1455,7 @@ DEFUN (no_ip_rip_send_version,
"Routing Information Protocol\n"
"Advertisement transmission\n"
"Version control\n"
"Version 1\n"
"Version 2\n")
"RIP version\n")
{
VTY_DECLVAR_CONTEXT(interface, ifp);
struct rip_interface *ri;
@ -2034,12 +1994,10 @@ rip_if_init (void)
install_element (INTERFACE_NODE, &ip_rip_send_version_cmd);
install_element (INTERFACE_NODE, &ip_rip_send_version_1_cmd);
install_element (INTERFACE_NODE, &ip_rip_send_version_2_cmd);
install_element (INTERFACE_NODE, &no_ip_rip_send_version_cmd);
install_element (INTERFACE_NODE, &ip_rip_receive_version_cmd);
install_element (INTERFACE_NODE, &ip_rip_receive_version_1_cmd);
install_element (INTERFACE_NODE, &ip_rip_receive_version_2_cmd);
install_element (INTERFACE_NODE, &no_ip_rip_receive_version_cmd);
install_element (INTERFACE_NODE, &ip_rip_v2_broadcast_cmd);

View File

@ -1272,9 +1272,8 @@ DEFUNSH (VTYSH_BGPD,
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")
"Address Family\n"
"Address Family modifier\n")
{
vty->node = BGP_EVPN_NODE;
return CMD_SUCCESS;
@ -2446,10 +2445,9 @@ DEFUNSH (VTYSH_ALL,
DEFUNSH (VTYSH_ALL,
vtysh_config_password,
vtysh_password_cmd,
"password (8-8) WORD",
"password [(8-8)] WORD",
"Assign the terminal connection password\n"
"Specifies a HIDDEN password will follow\n"
"dummy string \n"
"The HIDDEN line password string\n")
{
return CMD_SUCCESS;

View File

@ -1774,7 +1774,7 @@ mpls_str2label (const char *label_str, u_int8_t *num_labels,
if (!rc)
{
*num_labels = i + 1;
*num_labels = i;
memcpy (labels, pl, *num_labels * sizeof (mpls_label_t));
}

View File

@ -433,8 +433,7 @@ DEFUN (ip_route_flags,
"Set tag for this route\n"
"Tag value\n"
"Distance value for this route\n"
VRF_CMD_HELP_STR
MPLS_LABEL_HELPSTR)
VRF_CMD_HELP_STR)
{
int idx_ipv4_prefixlen = 2;
int idx_reject_blackhole = 3;
@ -466,8 +465,7 @@ DEFUN (ip_route_mask,
"Set tag for this route\n"
"Tag value\n"
"Distance value for this route\n"
VRF_CMD_HELP_STR
MPLS_LABEL_HELPSTR)
VRF_CMD_HELP_STR)
{
int idx_ipv4 = 2;
int idx_ipv4_2 = 3;
@ -497,8 +495,7 @@ DEFUN (ip_route_mask_flags,
"Set tag for this route\n"
"Tag value\n"
"Distance value for this route\n"
VRF_CMD_HELP_STR
MPLS_LABEL_HELPSTR)
VRF_CMD_HELP_STR)
{
int idx_ipv4 = 2;
int idx_ipv4_2 = 3;
@ -530,8 +527,7 @@ DEFUN (no_ip_route,
"Tag of this route\n"
"Tag value\n"
"Distance value for this route\n"
VRF_CMD_HELP_STR
MPLS_LABEL_HELPSTR)
VRF_CMD_HELP_STR)
{
int idx_ipv4_prefixlen = 3;
int idx_ipv4_ifname_null = 4;
@ -561,8 +557,7 @@ DEFUN (no_ip_route_flags,
"Tag of this route\n"
"Tag value\n"
"Distance value for this route\n"
VRF_CMD_HELP_STR
MPLS_LABEL_HELPSTR)
VRF_CMD_HELP_STR)
{
int idx_ipv4_prefixlen = 3;
int idx_curr = 5;
@ -591,8 +586,7 @@ DEFUN (no_ip_route_mask,
"Tag of this route\n"
"Tag value\n"
"Distance value for this route\n"
VRF_CMD_HELP_STR
MPLS_LABEL_HELPSTR)
VRF_CMD_HELP_STR)
{
int idx_ipv4 = 3;
int idx_ipv4_2 = 4;
@ -624,8 +618,7 @@ DEFUN (no_ip_route_mask_flags,
"Tag of this route\n"
"Tag value\n"
"Distance value for this route\n"
VRF_CMD_HELP_STR
MPLS_LABEL_HELPSTR)
VRF_CMD_HELP_STR)
{
int idx_ipv4 = 3;
int idx_ipv4_2 = 4;
@ -2170,8 +2163,7 @@ DEFUN (ipv6_route,
"Set tag for this route\n"
"Tag value\n"
"Distance value for this prefix\n"
VRF_CMD_HELP_STR
MPLS_LABEL_HELPSTR)
VRF_CMD_HELP_STR)
{
int idx_ipv6_prefixlen = 2;
int idx_ipv6_ifname;
@ -2217,8 +2209,7 @@ DEFUN (ipv6_route_flags,
"Set tag for this route\n"
"Tag value\n"
"Distance value for this prefix\n"
VRF_CMD_HELP_STR
MPLS_LABEL_HELPSTR)
VRF_CMD_HELP_STR)
{
int idx_ipv6_prefixlen = 2;
int idx_ipv6_ifname;
@ -2266,8 +2257,7 @@ DEFUN (ipv6_route_ifname,
"Set tag for this route\n"
"Tag value\n"
"Distance value for this prefix\n"
VRF_CMD_HELP_STR
MPLS_LABEL_HELPSTR)
VRF_CMD_HELP_STR)
{
int idx_ipv6_prefixlen = 2;
int idx_ipv6 = 3;
@ -2317,8 +2307,7 @@ DEFUN (ipv6_route_ifname_flags,
"Set tag for this route\n"
"Tag value\n"
"Distance value for this prefix\n"
VRF_CMD_HELP_STR
MPLS_LABEL_HELPSTR)
VRF_CMD_HELP_STR)
{
int idx_ipv6_prefixlen = 2;
int idx_ipv6;
@ -2371,8 +2360,7 @@ DEFUN (no_ipv6_route,
"Set tag for this route\n"
"Tag value\n"
"Distance value for this prefix\n"
VRF_CMD_HELP_STR
MPLS_LABEL_HELPSTR)
VRF_CMD_HELP_STR)
{
int idx_ipv6_prefixlen = 3;
int idx_ipv6_ifname;
@ -2419,8 +2407,7 @@ DEFUN (no_ipv6_route_flags,
"Set tag for this route\n"
"Tag value\n"
"Distance value for this prefix\n"
VRF_CMD_HELP_STR
MPLS_LABEL_HELPSTR)
VRF_CMD_HELP_STR)
{
int idx_ipv6_prefixlen = 3;
int idx_ipv6_ifname;
@ -2469,8 +2456,7 @@ DEFUN (no_ipv6_route_ifname,
"Set tag for this route\n"
"Tag value\n"
"Distance value for this prefix\n"
VRF_CMD_HELP_STR
MPLS_LABEL_HELPSTR)
VRF_CMD_HELP_STR)
{
int idx_ipv6_prefixlen = 3;
int idx_ipv6;
@ -2521,8 +2507,7 @@ DEFUN (no_ipv6_route_ifname_flags,
"Set tag for this route\n"
"Tag value\n"
"Distance value for this prefix\n"
VRF_CMD_HELP_STR
MPLS_LABEL_HELPSTR)
VRF_CMD_HELP_STR)
{
int idx_ipv6_prefixlen = 3;
int idx_ipv6;