From c28a7c1aa6a8ddc853753517489889a60d6313dc Mon Sep 17 00:00:00 2001 From: claudio Date: Thu, 27 May 2021 16:32:13 +0000 Subject: [PATCH] Stop processing UPDATES if the peer is not up. When the RDE issues an UPDATE NOTIFICATION because of some fatal error like max-prefix count reached the peer is put into state PEER_ERR by rde_update_err() and all UDPDATEs that are still queued should be dropped. Noticed and OK deraadt@, OK job@ --- usr.sbin/bgpd/rde.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 9cbeb7c4d33..11d7d57bca3 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.523 2021/05/27 14:32:08 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.524 2021/05/27 16:32:13 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -1077,6 +1077,8 @@ rde_dispatch_imsg_peer(struct rde_peer *peer, void *bula) switch (imsg.hdr.type) { case IMSG_UPDATE: + if (peer->state != PEER_UP) + break; rde_update_dispatch(peer, &imsg); break; case IMSG_SESSION_UP: -- 2.20.1