diff --git a/src/sonic-frr/patch/0029-bgpd-Change-log-level-for-graceful-restart-events.patch b/src/sonic-frr/patch/0029-bgpd-Change-log-level-for-graceful-restart-events.patch new file mode 100644 index 0000000000..a3474ae64f --- /dev/null +++ b/src/sonic-frr/patch/0029-bgpd-Change-log-level-for-graceful-restart-events.patch @@ -0,0 +1,122 @@ +From c423bce4db804c1d07d65ce3d06a9e62c4eceb2b Mon Sep 17 00:00:00 2001 +From: stormliang +Date: Mon, 19 Jun 2023 13:57:01 +0000 +Subject: [PATCH] change log level for graceful restart events + +--- + bgpd/bgp_fsm.c | 44 ++++++++++++++++++++------------------------ + bgpd/bgpd.c | 12 +++++------- + 2 files changed, 25 insertions(+), 31 deletions(-) + +diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c +index 672fa4512..e392cd6e1 100644 +--- a/bgpd/bgp_fsm.c ++++ b/bgpd/bgp_fsm.c +@@ -786,9 +786,9 @@ static int bgp_graceful_restart_timer_expire(struct thread *thread) + + peer = THREAD_ARG(thread); + +- if (bgp_debug_neighbor_events(peer)) { +- zlog_debug("%s graceful restart timer expired", peer->host); +- zlog_debug("%s graceful restart stalepath timer stopped", ++ if (peer) { ++ zlog_info("%s graceful restart timer expired", peer->host); ++ zlog_info("%s graceful restart stalepath timer stopped", + peer->host); + } + +@@ -852,8 +852,8 @@ static int bgp_graceful_stale_timer_expire(struct thread *thread) + + peer = THREAD_ARG(thread); + +- if (bgp_debug_neighbor_events(peer)) +- zlog_debug("%s graceful restart stalepath timer expired", ++ if (peer) ++ zlog_info("%s graceful restart stalepath timer expired", + peer->host); + + /* NSF delete stale route */ +@@ -1427,20 +1427,18 @@ int bgp_stop(struct peer *peer) + /* graceful restart */ + if (peer->t_gr_stale) { + BGP_TIMER_OFF(peer->t_gr_stale); +- if (bgp_debug_neighbor_events(peer)) +- zlog_debug( +- "%s graceful restart stalepath timer stopped", +- peer->host); ++ zlog_info( ++ "%s graceful restart stalepath timer stopped", ++ peer->host); + } + if (CHECK_FLAG(peer->sflags, PEER_STATUS_NSF_WAIT)) { +- if (bgp_debug_neighbor_events(peer)) { +- zlog_debug( +- "%s graceful restart timer started for %d sec", +- peer->host, peer->v_gr_restart); +- zlog_debug( +- "%s graceful restart stalepath timer started for %d sec", +- peer->host, peer->bgp->stalepath_time); +- } ++ zlog_info( ++ "%s graceful restart timer started for %d sec", ++ peer->host, peer->v_gr_restart); ++ zlog_info( ++ "%s graceful restart stalepath timer started for %d sec", ++ peer->host, peer->bgp->stalepath_time); ++ + BGP_TIMER_ON(peer->t_gr_restart, + bgp_graceful_restart_timer_expire, + peer->v_gr_restart); +@@ -2205,18 +2203,16 @@ static int bgp_establish(struct peer *peer) + UNSET_FLAG(peer->sflags, PEER_STATUS_NSF_MODE); + if (peer->t_gr_stale) { + BGP_TIMER_OFF(peer->t_gr_stale); +- if (bgp_debug_neighbor_events(peer)) +- zlog_debug( +- "%s graceful restart stalepath timer stopped", +- peer->host); ++ zlog_info( ++ "%s graceful restart stalepath timer stopped", ++ peer->host); + } + } + + if (peer->t_gr_restart) { + BGP_TIMER_OFF(peer->t_gr_restart); +- if (bgp_debug_neighbor_events(peer)) +- zlog_debug("%s graceful restart timer stopped", +- peer->host); ++ zlog_info("%s graceful restart timer stopped", ++ peer->host); + } + + /* Reset uptime, turn on keepalives, send current table. */ +diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c +index 7e528b219..2fc471555 100644 +--- a/bgpd/bgpd.c ++++ b/bgpd/bgpd.c +@@ -2346,16 +2346,14 @@ void peer_nsf_stop(struct peer *peer) + + if (peer->t_gr_restart) { + BGP_TIMER_OFF(peer->t_gr_restart); +- if (bgp_debug_neighbor_events(peer)) +- zlog_debug("%s graceful restart timer stopped", +- peer->host); ++ zlog_info("%s graceful restart timer stopped", ++ peer->host); + } + if (peer->t_gr_stale) { + BGP_TIMER_OFF(peer->t_gr_stale); +- if (bgp_debug_neighbor_events(peer)) +- zlog_debug( +- "%s graceful restart stalepath timer stopped", +- peer->host); ++ zlog_info( ++ "%s graceful restart stalepath timer stopped", ++ peer->host); + } + bgp_clear_route_all(peer); + } +-- +2.25.1 + diff --git a/src/sonic-frr/patch/series b/src/sonic-frr/patch/series index 7fef7127fb..b9b3c9eb32 100644 --- a/src/sonic-frr/patch/series +++ b/src/sonic-frr/patch/series @@ -13,3 +13,4 @@ Disable-ipv6-src-address-test-in-pceplib.patch 0012-Ensure-ospf_apiclient_lsa_originate-cannot-accidently-write-into-stack.patch 0027-bgpd-Ensure-FRR-has-enough-data-to-read-in-peek_for_as4_capability-and-bgp_open_option_parse.patch 0028-bgpd-Ensure-that-bgp-open-message-stream-has-enough-data-to-read.patch +0029-bgpd-Change-log-level-for-graceful-restart-events.patch