summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-05-04 13:35:25 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-05-04 13:35:25 -0400
commitd476347d5d60f59647ceb51d2cee1b56153e9903 (patch)
tree86a5e8dc46665aaeb95fcf6a1d8d620d4dd94255
parent047b41ee552c94949bdea9a7c6a159010d38910b (diff)
parent3c6f31c006e1584df847bbbcef64fdb4a38295ed (diff)
Merge remote-tracking branch 'origin/stable/3.0'
-rw-r--r--bgpd/bgp_vty.c10
-rw-r--r--ospf6d/ospf6_asbr.c9
-rw-r--r--ospf6d/ospf6_zebra.c2
-rw-r--r--ospfd/ospf_vty.c4
-rw-r--r--pimd/pim_cmd.c2
-rw-r--r--zebra/label_manager.c1
6 files changed, 20 insertions, 8 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index a30721715c..31f7872de2 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -3452,6 +3452,9 @@ peer_flag_modify_vty (struct vty *vty, const char *ip_str,
return CMD_WARNING;
}
+ if (!set && flag == PEER_FLAG_SHUTDOWN)
+ peer_tx_shutdown_message_unset (peer);
+
if (set)
ret = peer_flag_set (peer, flag);
else
@@ -3510,9 +3513,11 @@ DEFUN (neighbor_shutdown_msg,
if (argc >= 5)
{
- struct peer *peer = peer_lookup_vty (vty, argv[idx_peer]->arg);
+ 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);
@@ -3540,9 +3545,6 @@ DEFUN (no_neighbor_shutdown_msg,
{
int idx_peer = 2;
- struct peer *peer = peer_lookup_vty (vty, argv[idx_peer]->arg);
- peer_tx_shutdown_message_unset (peer);
-
return peer_flag_unset_vty (vty, argv[idx_peer]->arg, PEER_FLAG_SHUTDOWN);
}
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index 8caae50221..da90e2f966 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -1170,6 +1170,15 @@ ospf6_routemap_init (void)
route_map_set_metric_hook (generic_set_add);
route_map_no_set_metric_hook (generic_set_delete);
+ route_map_match_tag_hook (generic_match_add);
+ route_map_no_match_tag_hook (generic_match_delete);
+
+ route_map_match_ipv6_address_prefix_list_hook (generic_match_add);
+ route_map_no_match_ipv6_address_prefix_list_hook (generic_match_delete);
+
+ route_map_match_interface_hook (generic_match_add);
+ route_map_no_match_interface_hook (generic_match_delete);
+
route_map_install_match (&ospf6_routemap_rule_match_address_prefixlist_cmd);
route_map_install_match (&ospf6_routemap_rule_match_interface_cmd);
route_map_install_match (&ospf6_routemap_rule_match_tag_cmd);
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c
index 1904623e71..d0c9e4f042 100644
--- a/ospf6d/ospf6_zebra.c
+++ b/ospf6d/ospf6_zebra.c
@@ -289,7 +289,7 @@ ospf6_zebra_read_ipv6 (int command, struct zclient *zclient,
snprintf (nexthopstr, sizeof (nexthopstr), "::");
zlog_debug ("Zebra Receive route %s: %s %s nexthop %s ifindex %ld tag %"ROUTE_TAG_PRI,
- (command == ZEBRA_IPV6_ROUTE_ADD ? "add" : "delete"),
+ (command == ZEBRA_REDISTRIBUTE_IPV6_ADD ? "add" : "delete"),
zebra_route_string(api.type), prefixstr, nexthopstr, ifindex, api.tag);
}
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 23a0e682c8..9e577105ca 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -7161,7 +7161,7 @@ DEFUN (no_ospf_redistribute_source,
DEFUN (ospf_redistribute_instance_source,
ospf_redistribute_instance_source_cmd,
- "redistribute <ospf|table> (1-65535) {<metric (0-16777214)|metric-type (1-2)|route-map WORD>}",
+ "redistribute <ospf|table> (1-65535) {metric (0-16777214)|metric-type (1-2)|route-map WORD}",
REDIST_STR
"Open Shortest Path First\n"
"Non-main Kernel Routing Table\n"
@@ -7232,7 +7232,7 @@ DEFUN (ospf_redistribute_instance_source,
DEFUN (no_ospf_redistribute_instance_source,
no_ospf_redistribute_instance_source_cmd,
- "no redistribute <ospf|table> (1-65535) {<metric (0-16777214)|metric-type (1-2)|route-map WORD>}",
+ "no redistribute <ospf|table> (1-65535) {metric (0-16777214)|metric-type (1-2)|route-map WORD}",
NO_STR
REDIST_STR
"Open Shortest Path First\n"
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index f1a73afa9a..ee3538a054 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -5109,7 +5109,7 @@ DEFUN (interface_ip_pim_hello,
pim_ifp->pim_hello_period = strtol(argv[idx_time]->arg, NULL, 10);
- if (argc == idx_hold)
+ if (argc == idx_hold + 1)
pim_ifp->pim_default_holdtime = strtol(argv[idx_hold]->arg, NULL, 10);
return CMD_SUCCESS;
diff --git a/zebra/label_manager.c b/zebra/label_manager.c
index 9f8378572f..bf67141cd4 100644
--- a/zebra/label_manager.c
+++ b/zebra/label_manager.c
@@ -228,6 +228,7 @@ struct label_manager_chunk *assign_label_chunk(u_char proto, u_short instance,
if (lmc->start > MPLS_MAX_UNRESERVED_LABEL - size + 1) {
zlog_err("Reached max labels. Start: %u, size: %u", lmc->start,
size);
+ XFREE(MTYPE_LM_CHUNK, lmc);
return NULL;
}
lmc->end = lmc->start + size - 1;