From: claudio Date: Thu, 11 Jan 2024 15:38:05 +0000 (+0000) Subject: Clear the last errors after receiving a RTR_EVNT_END_OF_DATA event. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=047cb73c253b7c7b98ef7cf0122e2d846767f58c;p=openbsd Clear the last errors after receiving a RTR_EVNT_END_OF_DATA event. Once the cache is synced we can assume that the errors are no longer relevant. OK tb@ --- diff --git a/usr.sbin/bgpd/rtr_proto.c b/usr.sbin/bgpd/rtr_proto.c index de813fb0bd0..46a04340845 100644 --- a/usr.sbin/bgpd/rtr_proto.c +++ b/usr.sbin/bgpd/rtr_proto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtr_proto.c,v 1.30 2024/01/11 13:08:39 claudio Exp $ */ +/* $OpenBSD: rtr_proto.c,v 1.31 2024/01/11 15:38:05 claudio Exp $ */ /* * Copyright (c) 2020 Claudio Jeker @@ -1174,6 +1174,11 @@ rtr_fsm(struct rtr_session *rs, enum rtr_event event) rtr_sem_release(rs->active_lock); rtr_recalc(); rs->active_lock = 0; + /* clear the last errors */ + rs->last_sent_error = NO_ERROR; + rs->last_recv_error = NO_ERROR; + rs->last_sent_msg[0] = '\0'; + rs->last_recv_msg[0] = '\0'; break; case RTR_EVNT_CACHE_RESET: rtr_reset_cache(rs);