diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-01-11 15:38:06 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-01-11 15:38:06 +0000 |
commit | 3527fa5d68b86e7d00a30cf9d7432aca5428fab9 (patch) | |
tree | 6bed76291f4a3ccb7bfbe49db4110c0255e82945 /usr.sbin/bgpd | |
parent | a9adea117fad562f0e81cd436f9ecb1474a99611 (diff) |
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@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/rtr_proto.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 <claudio@openbsd.org> @@ -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); |