summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2021-05-27 16:32:14 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2021-05-27 16:32:14 +0000
commitec96000e8b4cafb078e1f926de1c414a45b878f9 (patch)
tree55fe610dee17d1c2b2cc8021dd86c576cc2ba43f /usr.sbin
parentf5fbc946c25f4da7d792b1806fc3d9535de004f9 (diff)
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@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/rde.c4
1 files changed, 3 insertions, 1 deletions
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 <henning@openbsd.org>
@@ -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: