mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 05:58:17 +00:00
zebra, ospfd: fix typos in the graceful restart code
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
162e8460b9
commit
98cb53f96a
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
static const char * const ospf_exit_reason_desc[] = {
|
static const char * const ospf_exit_reason_desc[] = {
|
||||||
"Unknown reason",
|
"Unknown reason",
|
||||||
"Helper inprogress",
|
"Helper in progress",
|
||||||
"Topology Change",
|
"Topology Change",
|
||||||
"Grace timer expiry",
|
"Grace timer expiry",
|
||||||
"Successful graceful restart",
|
"Successful graceful restart",
|
||||||
@ -366,7 +366,7 @@ static int ospf_handle_grace_timer_expiry(struct thread *thread)
|
|||||||
* Grace LSA received from RESTARTER.
|
* Grace LSA received from RESTARTER.
|
||||||
*
|
*
|
||||||
* nbr
|
* nbr
|
||||||
* ospf neighbour which requets the router to act as
|
* OSPF neighbour which requests the router to act as
|
||||||
* HELPER.
|
* HELPER.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
@ -398,11 +398,11 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,
|
|||||||
|
|
||||||
if (IS_DEBUG_OSPF_GR_HELPER)
|
if (IS_DEBUG_OSPF_GR_HELPER)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"%s, Grace LSA received from %pI4, grace interval:%u, restartreason :%s",
|
"%s, Grace LSA received from %pI4, grace interval:%u, restart reason:%s",
|
||||||
__func__, &restart_addr, grace_interval,
|
__func__, &restart_addr, grace_interval,
|
||||||
ospf_restart_reason2str(restart_reason));
|
ospf_restart_reason2str(restart_reason));
|
||||||
|
|
||||||
/* Incase of broadcast links, if RESTARTER is DR_OTHER,
|
/* In case of broadcast links, if RESTARTER is DR_OTHER,
|
||||||
* grace LSA might be received from DR, so need to get
|
* grace LSA might be received from DR, so need to get
|
||||||
* actual neighbour info , here RESTARTER.
|
* actual neighbour info , here RESTARTER.
|
||||||
*/
|
*/
|
||||||
@ -465,7 +465,7 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,
|
|||||||
return OSPF_GR_NOT_HELPER;
|
return OSPF_GR_NOT_HELPER;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check the retranmission list of this
|
/* Check the retransmission list of this
|
||||||
* neighbour, check any change in lsas.
|
* neighbour, check any change in lsas.
|
||||||
*/
|
*/
|
||||||
if (ospf->strict_lsa_check && !ospf_ls_retransmit_isempty(restarter)
|
if (ospf->strict_lsa_check && !ospf_ls_retransmit_isempty(restarter)
|
||||||
@ -483,7 +483,7 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,
|
|||||||
if (ntohs(lsa->data->ls_age) >= grace_interval) {
|
if (ntohs(lsa->data->ls_age) >= grace_interval) {
|
||||||
if (IS_DEBUG_OSPF_GR_HELPER)
|
if (IS_DEBUG_OSPF_GR_HELPER)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"%s, Grace LSA age(%d) is more than the graceinterval(%d)",
|
"%s, Grace LSA age(%d) is more than the grace interval(%d)",
|
||||||
__func__, lsa->data->ls_age, grace_interval);
|
__func__, lsa->data->ls_age, grace_interval);
|
||||||
restarter->gr_helper_info.rejected_reason =
|
restarter->gr_helper_info.rejected_reason =
|
||||||
OSPF_HELPER_LSA_AGE_MORE;
|
OSPF_HELPER_LSA_AGE_MORE;
|
||||||
@ -532,7 +532,7 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,
|
|||||||
restarter->gr_helper_info.gr_restart_reason = restart_reason;
|
restarter->gr_helper_info.gr_restart_reason = restart_reason;
|
||||||
restarter->gr_helper_info.rejected_reason = OSPF_HELPER_REJECTED_NONE;
|
restarter->gr_helper_info.rejected_reason = OSPF_HELPER_REJECTED_NONE;
|
||||||
|
|
||||||
/* Incremnet the active restarer count */
|
/* Increment the active restarter count */
|
||||||
ospf->active_restarter_cnt++;
|
ospf->active_restarter_cnt++;
|
||||||
|
|
||||||
if (IS_DEBUG_OSPF_GR_HELPER)
|
if (IS_DEBUG_OSPF_GR_HELPER)
|
||||||
@ -552,7 +552,7 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,
|
|||||||
* retransmission list.
|
* retransmission list.
|
||||||
*
|
*
|
||||||
* nbr
|
* nbr
|
||||||
* ospf neighbor
|
* OSPF neighbor
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* TRUE - if any change in the lsa.
|
* TRUE - if any change in the lsa.
|
||||||
@ -603,7 +603,7 @@ static bool ospf_check_change_in_rxmt_list(struct ospf_neighbor *nbr)
|
|||||||
* ospf
|
* ospf
|
||||||
* ospf pointer
|
* ospf pointer
|
||||||
* lsa
|
* lsa
|
||||||
* topo change occured due to this lsa type (1 to 5 and 7)
|
* topo change occurred due to this lsa type (1 to 5 and 7)
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* Nothing
|
* Nothing
|
||||||
@ -617,7 +617,7 @@ void ospf_helper_handle_topo_chg(struct ospf *ospf, struct ospf_lsa *lsa)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* Topo change not required to be handled if strict
|
/* Topo change not required to be handled if strict
|
||||||
* LSA check is disbaled for this router.
|
* LSA check is disabled for this router.
|
||||||
*/
|
*/
|
||||||
if (!ospf->strict_lsa_check)
|
if (!ospf->strict_lsa_check)
|
||||||
return;
|
return;
|
||||||
@ -707,14 +707,14 @@ void ospf_gr_helper_exit(struct ospf_neighbor *nbr,
|
|||||||
ospf->active_restarter_cnt--;
|
ospf->active_restarter_cnt--;
|
||||||
|
|
||||||
/* If the exit not triggered due to grace timer
|
/* If the exit not triggered due to grace timer
|
||||||
* expairy , stop the grace timer.
|
* expiry, stop the grace timer.
|
||||||
*/
|
*/
|
||||||
if (reason != OSPF_GR_HELPER_GRACE_TIMEOUT)
|
if (reason != OSPF_GR_HELPER_GRACE_TIMEOUT)
|
||||||
THREAD_OFF(nbr->gr_helper_info.t_grace_timer);
|
THREAD_OFF(nbr->gr_helper_info.t_grace_timer);
|
||||||
|
|
||||||
/* check exit triggered due to successful completion
|
/* check exit triggered due to successful completion
|
||||||
* of graceful restart.
|
* of graceful restart.
|
||||||
* If no, bringdown the neighbour.
|
* If no, bring down the neighbour.
|
||||||
*/
|
*/
|
||||||
if (reason != OSPF_GR_HELPER_COMPLETED) {
|
if (reason != OSPF_GR_HELPER_COMPLETED) {
|
||||||
if (IS_DEBUG_OSPF_GR_HELPER)
|
if (IS_DEBUG_OSPF_GR_HELPER)
|
||||||
@ -737,7 +737,7 @@ void ospf_gr_helper_exit(struct ospf_neighbor *nbr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Process Maxage Grace LSA.
|
* Process MaxAge Grace LSA.
|
||||||
* It is a indication for successful completion of GR.
|
* It is a indication for successful completion of GR.
|
||||||
* If router acting as HELPER, It exits from helper role.
|
* If router acting as HELPER, It exits from helper role.
|
||||||
*
|
*
|
||||||
@ -748,7 +748,7 @@ void ospf_gr_helper_exit(struct ospf_neighbor *nbr,
|
|||||||
* Grace LSA received from RESTARTER.
|
* Grace LSA received from RESTARTER.
|
||||||
*
|
*
|
||||||
* nbr
|
* nbr
|
||||||
* ospf neighbour which requets the router to act as
|
* OSPF neighbour which requests the router to act as
|
||||||
* HELPER.
|
* HELPER.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
@ -803,7 +803,7 @@ void ospf_process_maxage_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,
|
|||||||
* Disable/Enable HELPER support on router level.
|
* Disable/Enable HELPER support on router level.
|
||||||
*
|
*
|
||||||
* ospf
|
* ospf
|
||||||
* OSPFpointer.
|
* OSPF pointer.
|
||||||
*
|
*
|
||||||
* status
|
* status
|
||||||
* TRUE/FALSE
|
* TRUE/FALSE
|
||||||
@ -844,7 +844,7 @@ void ospf_gr_helper_support_set(struct ospf *ospf, bool support)
|
|||||||
lookup.advRtrAddr.s_addr =
|
lookup.advRtrAddr.s_addr =
|
||||||
nbr->router_id.s_addr;
|
nbr->router_id.s_addr;
|
||||||
/* check if helper support enabled for the
|
/* check if helper support enabled for the
|
||||||
* correspodning routerid.If enabled, dont
|
* corresponding routerid.If enabled, dont
|
||||||
* dont exit from helper role.
|
* dont exit from helper role.
|
||||||
*/
|
*/
|
||||||
if (hash_lookup(ospf->enable_rtr_list, &lookup))
|
if (hash_lookup(ospf->enable_rtr_list, &lookup))
|
||||||
|
@ -1862,9 +1862,9 @@ static void ospf_ls_upd(struct ospf *ospf, struct ip *iph,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get list of LSAs from Link State Update packet. - Also perorms Stages
|
/* Get list of LSAs from Link State Update packet. - Also performs
|
||||||
* 1 (validate LSA checksum) and 2 (check for LSA consistent type)
|
* Stages 1 (validate LSA checksum) and 2 (check for LSA consistent
|
||||||
* of section 13.
|
* type) of section 13.
|
||||||
*/
|
*/
|
||||||
lsas = ospf_ls_upd_list_lsa(nbr, s, oi, size);
|
lsas = ospf_ls_upd_list_lsa(nbr, s, oi, size);
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ static struct client_gr_info *zebra_gr_client_info_create(struct zserv *client)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A helper function to delte and destory client info.
|
* A helper function to delete and destroy client info.
|
||||||
*/
|
*/
|
||||||
static void zebra_gr_client_info_delte(struct zserv *client,
|
static void zebra_gr_client_info_delte(struct zserv *client,
|
||||||
struct client_gr_info *info)
|
struct client_gr_info *info)
|
||||||
@ -162,7 +162,7 @@ int32_t zebra_gr_client_disconnect(struct zserv *client)
|
|||||||
|
|
||||||
client->restart_time = monotime(&tv);
|
client->restart_time = monotime(&tv);
|
||||||
|
|
||||||
/* For all the GR instance start the starle removal timer. */
|
/* For all the GR instance start the stale removal timer. */
|
||||||
TAILQ_FOREACH (info, &client->gr_info_queue, gr_info) {
|
TAILQ_FOREACH (info, &client->gr_info_queue, gr_info) {
|
||||||
if (ZEBRA_CLIENT_GR_ENABLED(info->capabilities)
|
if (ZEBRA_CLIENT_GR_ENABLED(info->capabilities)
|
||||||
&& (info->t_stale_removal == NULL)) {
|
&& (info->t_stale_removal == NULL)) {
|
||||||
@ -298,7 +298,7 @@ void zebra_gr_client_reconnect(struct zserv *client)
|
|||||||
/*
|
/*
|
||||||
* Update the graceful restart information
|
* Update the graceful restart information
|
||||||
* for the client instance.
|
* for the client instance.
|
||||||
* This function handles all the capabilties that are received.
|
* This function handles all the capabilities that are received.
|
||||||
*/
|
*/
|
||||||
static void zebra_client_update_info(struct zserv *client, struct zapi_cap *api)
|
static void zebra_client_update_info(struct zserv *client, struct zapi_cap *api)
|
||||||
{
|
{
|
||||||
@ -334,7 +334,7 @@ static void zebra_client_update_info(struct zserv *client, struct zapi_cap *api)
|
|||||||
if (!info)
|
if (!info)
|
||||||
info = zebra_gr_client_info_create(client);
|
info = zebra_gr_client_info_create(client);
|
||||||
|
|
||||||
/* Udpate other parameters */
|
/* Update other parameters */
|
||||||
if (!info->gr_enable) {
|
if (!info->gr_enable) {
|
||||||
client->gr_instance_count++;
|
client->gr_instance_count++;
|
||||||
|
|
||||||
@ -460,7 +460,7 @@ static int32_t zebra_gr_route_stale_delete_timer_expiry(struct thread *thread)
|
|||||||
|
|
||||||
cnt = zebra_gr_delete_stale_routes(info);
|
cnt = zebra_gr_delete_stale_routes(info);
|
||||||
|
|
||||||
/* Retsart the timer */
|
/* Restart the timer */
|
||||||
if (cnt > 0) {
|
if (cnt > 0) {
|
||||||
LOG_GR("%s: Client %s processed %d routes. Start timer again",
|
LOG_GR("%s: Client %s processed %d routes. Start timer again",
|
||||||
__func__, zebra_route_string(client->proto), cnt);
|
__func__, zebra_route_string(client->proto), cnt);
|
||||||
@ -471,7 +471,7 @@ static int32_t zebra_gr_route_stale_delete_timer_expiry(struct thread *thread)
|
|||||||
&info->t_stale_removal);
|
&info->t_stale_removal);
|
||||||
} else {
|
} else {
|
||||||
/* No routes to delete for the VRF */
|
/* No routes to delete for the VRF */
|
||||||
LOG_GR("%s: Client %s all starle routes processed", __func__,
|
LOG_GR("%s: Client %s all stale routes processed", __func__,
|
||||||
zebra_route_string(client->proto));
|
zebra_route_string(client->proto));
|
||||||
|
|
||||||
XFREE(MTYPE_TMP, info->current_prefix);
|
XFREE(MTYPE_TMP, info->current_prefix);
|
||||||
@ -668,7 +668,7 @@ static void zebra_gr_process_client_stale_routes(struct zserv *client,
|
|||||||
* Cancel the stale timer and process the routes
|
* Cancel the stale timer and process the routes
|
||||||
*/
|
*/
|
||||||
if (info->t_stale_removal) {
|
if (info->t_stale_removal) {
|
||||||
LOG_GR("%s: Client %s cancled stale delete timer vrf %d",
|
LOG_GR("%s: Client %s canceled stale delete timer vrf %d",
|
||||||
__func__, zebra_route_string(client->proto),
|
__func__, zebra_route_string(client->proto),
|
||||||
info->vrf_id);
|
info->vrf_id);
|
||||||
THREAD_OFF(info->t_stale_removal);
|
THREAD_OFF(info->t_stale_removal);
|
||||||
|
Loading…
Reference in New Issue
Block a user