summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_clist.c14
-rw-r--r--bgpd/bgp_fsm.c6
-rw-r--r--bgpd/bgp_mplsvpn.c13
-rw-r--r--bgpd/bgp_nht.c6
-rw-r--r--bgpd/bgp_vty.c4
-rw-r--r--doc/developer/workflow.rst18
-rw-r--r--eigrpd/eigrp_update.c3
-rw-r--r--lib/command.c8
-rw-r--r--mgmtd/mgmt_txn.c11
-rw-r--r--ospf6d/ospf6_interface.c1
-rw-r--r--tests/topotests/mgmt_startup/test_bigconf.py4
-rw-r--r--tests/topotests/mgmt_startup/test_late_bigconf.py6
-rw-r--r--zebra/zebra_mlag.c2
-rw-r--r--zebra/zserv.c2
14 files changed, 44 insertions, 54 deletions
diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c
index 1d2ba3bf58..ac5cdd6acb 100644
--- a/bgpd/bgp_clist.c
+++ b/bgpd/bgp_clist.c
@@ -899,15 +899,13 @@ int community_list_set(struct community_list_handler *ch, const char *name,
}
}
- if (str) {
- if (style == COMMUNITY_LIST_STANDARD)
- com = community_str2com(str);
- else
- regex = bgp_regcomp(str);
+ if (style == COMMUNITY_LIST_STANDARD)
+ com = community_str2com(str);
+ else
+ regex = bgp_regcomp(str);
- if (!com && !regex)
- return COMMUNITY_LIST_ERR_MALFORMED_VAL;
- }
+ if (!com && !regex)
+ return COMMUNITY_LIST_ERR_MALFORMED_VAL;
entry = community_entry_new();
entry->direct = direct;
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index a289d3d67a..ad6906d092 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -2656,12 +2656,12 @@ int bgp_event_update(struct peer *peer, enum bgp_fsm_events event)
ret != BGP_FSM_FAILURE_AND_DELETE) {
flog_err(
EC_BGP_FSM,
- "%s [FSM] Failure handling event %s in state %s, prior events %s, %s, fd %d",
+ "%s [FSM] Failure handling event %s in state %s, prior events %s, %s, fd %d, last reset: %s",
peer->host, bgp_event_str[peer->cur_event],
lookup_msg(bgp_status_msg, peer->status, NULL),
bgp_event_str[peer->last_event],
- bgp_event_str[peer->last_major_event],
- peer->fd);
+ bgp_event_str[peer->last_major_event], peer->fd,
+ peer_down_str[peer->last_reset]);
bgp_stop(peer);
bgp_fsm_change_status(peer, Idle);
bgp_timer_set(peer);
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c
index ecc84533b0..dc9bd3cff5 100644
--- a/bgpd/bgp_mplsvpn.c
+++ b/bgpd/bgp_mplsvpn.c
@@ -1467,13 +1467,12 @@ static mpls_label_t _vpn_leak_from_vrf_get_per_nexthop_label(
/* Unlink from any existing nexthop cache. Free the entry if unused.
*/
bgp_mplsvpn_path_nh_label_unlink(pi);
- if (blnc) {
- /* updates NHT pi list reference */
- LIST_INSERT_HEAD(&(blnc->paths), pi, label_nh_thread);
- pi->label_nexthop_cache = blnc;
- pi->label_nexthop_cache->path_count++;
- blnc->last_update = monotime(NULL);
- }
+
+ /* updates NHT pi list reference */
+ LIST_INSERT_HEAD(&(blnc->paths), pi, label_nh_thread);
+ pi->label_nexthop_cache = blnc;
+ pi->label_nexthop_cache->path_count++;
+ blnc->last_update = monotime(NULL);
/* then add or update the selected nexthop */
if (!blnc->nh)
diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index bda163d7a5..d7b1429881 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -547,7 +547,7 @@ static void bgp_process_nexthop_update(struct bgp_nexthop_cache *bnc,
char bnc_buf[BNC_FLAG_DUMP_SIZE];
zlog_debug(
- "%s(%u): Rcvd NH update %pFX(%u)%u) - metric %d/%d #nhops %d/%d flags %s",
+ "%s(%u): Rcvd NH update %pFX(%u)(%u) - metric %d/%d #nhops %d/%d flags %s",
bnc->bgp->name_pretty, bnc->bgp->vrf_id, &nhr->prefix,
bnc->ifindex, bnc->srte_color, nhr->metric, bnc->metric,
nhr->nexthop_num, bnc->nexthop_num,
@@ -849,7 +849,7 @@ void bgp_parse_nexthop_update(int command, vrf_id_t vrf_id)
if (!bnc_nhc) {
if (BGP_DEBUG(nht, NHT))
zlog_debug(
- "parse nexthop update(%pFX(%u)(%s)): bnc info not found for nexthop cache",
+ "parse nexthop update %pFX(%u)(%s): bnc info not found for nexthop cache",
&nhr.prefix, nhr.srte_color, bgp->name_pretty);
} else
bgp_process_nexthop_update(bnc_nhc, &nhr, false);
@@ -860,7 +860,7 @@ void bgp_parse_nexthop_update(int command, vrf_id_t vrf_id)
if (!bnc_import) {
if (BGP_DEBUG(nht, NHT))
zlog_debug(
- "parse nexthop update(%pFX(%u)(%s)): bnc info not found for import check",
+ "parse nexthop update %pFX(%u)(%s): bnc info not found for import check",
&nhr.prefix, nhr.srte_color, bgp->name_pretty);
} else
bgp_process_nexthop_update(bnc_import, &nhr, true);
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 7ef9db9f0d..04bdba1345 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -9199,6 +9199,8 @@ DEFPY(af_label_vpn_export_allocation_mode,
bool old_per_nexthop, new_per_nexthop;
afi = vpn_policy_getafi(vty, bgp, false);
+ if (afi == AFI_MAX)
+ return CMD_WARNING_CONFIG_FAILED;
old_per_nexthop = !!CHECK_FLAG(bgp->vpn_policy[afi].flags,
BGP_VPN_POLICY_TOVPN_LABEL_PER_NEXTHOP);
@@ -20663,6 +20665,7 @@ DEFUN (community_list_standard,
argv_find(argv, argc, "AA:NN", &idx);
char *str = argv_concat(argv, argc, idx);
+ assert(str);
int ret = community_list_set(bgp_clist, cl_name_or_number, str, seq,
direct, style);
@@ -20775,6 +20778,7 @@ DEFUN (community_list_expanded_all,
argv_find(argv, argc, "AA:NN", &idx);
char *str = argv_concat(argv, argc, idx);
+ assert(str);
int ret = community_list_set(bgp_clist, cl_name_or_number, str, seq,
direct, style);
diff --git a/doc/developer/workflow.rst b/doc/developer/workflow.rst
index 28cf5d0ab1..65befaccba 100644
--- a/doc/developer/workflow.rst
+++ b/doc/developer/workflow.rst
@@ -166,15 +166,15 @@ as early as possible, i.e. the first 2-week window.
For reference, the expected release schedule according to the above is:
-+---------+------------+------------+------------+------------+------------+
-| Release | 2023-03-07 | 2023-07-04 | 2023-10-31 | 2024-02-27 | 2024-06-25 |
-+---------+------------+------------+------------+------------+------------+
-| RC | 2023-02-21 | 2023-06-20 | 2023-10-17 | 2024-02-13 | 2024-06-11 |
-+---------+------------+------------+------------+------------+------------+
-| dev/X.Y | 2023-02-07 | 2023-06-06 | 2023-10-03 | 2024-01-30 | 2024-05-28 |
-+---------+------------+------------+------------+------------+------------+
-| freeze | 2023-01-24 | 2023-05-23 | 2023-09-19 | 2024-01-16 | 2024-05-14 |
-+---------+------------+------------+------------+------------+------------+
++---------+------------+------------+------------+
+| Release | 2023-07-04 | 2023-10-31 | 2024-02-27 |
++---------+------------+------------+------------+
+| RC | 2023-06-20 | 2023-10-17 | 2024-02-13 |
++---------+------------+------------+------------+
+| dev/X.Y | 2023-06-06 | 2023-10-03 | 2024-01-30 |
++---------+------------+------------+------------+
+| freeze | 2023-05-23 | 2023-09-19 | 2024-01-16 |
++---------+------------+------------+------------+
Here is the hint on how to get the dates easily:
diff --git a/eigrpd/eigrp_update.c b/eigrpd/eigrp_update.c
index 2237a611e8..a056267bf7 100644
--- a/eigrpd/eigrp_update.c
+++ b/eigrpd/eigrp_update.c
@@ -842,9 +842,6 @@ static void eigrp_update_send_GR_part(struct eigrp_neighbor *nbr)
eigrp_fsm_event(&fsm_msg);
}
- /* NULL the pointer */
- dest_addr = NULL;
-
/* delete processed prefix from list */
listnode_delete(prefixes, pe);
diff --git a/lib/command.c b/lib/command.c
index e92251160f..0995637219 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -735,9 +735,13 @@ char *cmd_variable_comp2str(vector comps, unsigned short cols)
char *item = vector_slot(comps, j);
itemlen = strlen(item);
- if (cs + itemlen + AUTOCOMP_INDENT + 3 >= bsz)
- buf = XREALLOC(MTYPE_TMP, buf, (bsz *= 2));
+ size_t next_sz = cs + itemlen + AUTOCOMP_INDENT + 3;
+ if (next_sz > bsz) {
+ /* Make sure the buf size is large enough */
+ bsz = next_sz;
+ buf = XREALLOC(MTYPE_TMP, buf, bsz);
+ }
if (lc + itemlen + 1 >= cols) {
cs += snprintf(&buf[cs], bsz - cs, "\n%*s",
AUTOCOMP_INDENT, "");
diff --git a/mgmtd/mgmt_txn.c b/mgmtd/mgmt_txn.c
index bf59224338..3d818cb4c2 100644
--- a/mgmtd/mgmt_txn.c
+++ b/mgmtd/mgmt_txn.c
@@ -1022,7 +1022,7 @@ static int mgmt_txn_create_config_batches(struct mgmt_txn_req *txn_req,
(void)mgmt_txn_send_commit_cfg_reply(
txn_req->txn, MGMTD_INTERNAL_ERROR,
"Internal error! Could not get Xpath from Ds node!");
- goto mgmt_txn_create_config_batches_failed;
+ return -1;
}
value = (char *)lyd_get_value(chg->cb.dnode);
@@ -1130,18 +1130,11 @@ static int mgmt_txn_create_config_batches(struct mgmt_txn_req *txn_req,
(void)mgmt_txn_send_commit_cfg_reply(
txn_req->txn, MGMTD_NO_CFG_CHANGES,
"No changes found to commit!");
- goto mgmt_txn_create_config_batches_failed;
+ return -1;
}
cmtcfg_req->next_phase = MGMTD_COMMIT_PHASE_TXN_CREATE;
return 0;
-
-mgmt_txn_create_config_batches_failed:
-
- if (xpath)
- free(xpath);
-
- return -1;
}
static int mgmt_txn_prepare_config(struct mgmt_txn_ctx *txn)
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index ea059c4be6..0fb3d29e25 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -516,7 +516,6 @@ static int ospf6_interface_state_change(uint8_t next_state,
OSPF6_NETWORK_LSA_EXECUTE(oi);
OSPF6_INTRA_PREFIX_LSA_EXECUTE_TRANSIT(oi);
OSPF6_INTRA_PREFIX_LSA_SCHEDULE_STUB(oi->area);
- OSPF6_INTRA_PREFIX_LSA_EXECUTE_TRANSIT(oi);
} else if (prev_state == OSPF6_INTERFACE_DR
|| next_state == OSPF6_INTERFACE_DR) {
OSPF6_NETWORK_LSA_SCHEDULE(oi);
diff --git a/tests/topotests/mgmt_startup/test_bigconf.py b/tests/topotests/mgmt_startup/test_bigconf.py
index 465f646b6e..3b13229af5 100644
--- a/tests/topotests/mgmt_startup/test_bigconf.py
+++ b/tests/topotests/mgmt_startup/test_bigconf.py
@@ -69,10 +69,10 @@ def test_staticd_latestart(tgen):
check_vtysh_up(r1)
logging.info("r1: vtysh connected after %ss", track.elapsed())
- result = check_kernel(r1, ROUTE_RANGE[0], retry_timeout=20)
+ result = check_kernel(r1, ROUTE_RANGE[0], retry_timeout=60)
assert result is None
logging.info("r1: first route installed after %ss", track.elapsed())
- result = check_kernel(r1, ROUTE_RANGE[1], retry_timeout=20)
+ result = check_kernel(r1, ROUTE_RANGE[1], retry_timeout=60)
assert result is None
logging.info("r1: last route installed after %ss", track.elapsed())
diff --git a/tests/topotests/mgmt_startup/test_late_bigconf.py b/tests/topotests/mgmt_startup/test_late_bigconf.py
index ac7ac57cf8..5e594aba6c 100644
--- a/tests/topotests/mgmt_startup/test_late_bigconf.py
+++ b/tests/topotests/mgmt_startup/test_late_bigconf.py
@@ -68,9 +68,9 @@ def test_staticd_latestart(tgen):
check_vtysh_up(r1)
logging.info("r1: vtysh connected after %ss", track.elapsed())
- result = check_kernel(r1, ROUTE_RANGE[0], retry_timeout=20, expected=False)
+ result = check_kernel(r1, ROUTE_RANGE[0], retry_timeout=60, expected=False)
assert result is not None, "first route present and should not be"
- result = check_kernel(r1, ROUTE_RANGE[1], retry_timeout=20, expected=False)
+ result = check_kernel(r1, ROUTE_RANGE[1], retry_timeout=60, expected=False)
assert result is not None, "last route present and should not be"
step("Starting staticd")
@@ -78,5 +78,5 @@ def test_staticd_latestart(tgen):
result = check_kernel(r1, ROUTE_RANGE[0], retry_timeout=60)
assert result is None, "first route not present and should be"
- result = check_kernel(r1, ROUTE_RANGE[1], retry_timeout=20)
+ result = check_kernel(r1, ROUTE_RANGE[1], retry_timeout=60)
assert result is None, "last route not present and should be"
diff --git a/zebra/zebra_mlag.c b/zebra/zebra_mlag.c
index 6713dbc967..7715eab0a8 100644
--- a/zebra/zebra_mlag.c
+++ b/zebra/zebra_mlag.c
@@ -338,8 +338,6 @@ static void zebra_mlag_post_data_from_main_thread(struct event *thread)
}
}
- stream_free(s);
- return;
stream_failure:
stream_free(s);
if (zebra_s)
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 6abd49310c..d2367007cf 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -507,8 +507,6 @@ static void zserv_process_messages(struct event *thread)
stream_fifo_push(cache, msg);
}
- msg = NULL;
-
/* Need to reschedule processing work if there are still
* packets in the fifo.
*/