summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2021-04-16 06:20:30 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2021-04-16 06:20:30 +0000
commit5f28a73723655472ea95a9170c7446f17a55ca5b (patch)
tree9004adcafe048416e0749ab7b73f4aea28f23fde /usr.sbin/bgpd
parent774126ac70dfad3d174f7f1e8d3b7734f968064c (diff)
Add back IMSG_RECONF_ROA_ITEM in the parent imsg handler. It is needed
for origin-sets. Found by and reminder procter@ OK deraadt@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/rde.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index 51091eee9bb..2fc05f64c52 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.516 2021/03/02 09:45:07 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.517 2021/04/16 06:20:29 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -681,6 +681,7 @@ rde_dispatch_imsg_parent(struct imsgbuf *ibuf)
static struct l3vpn *vpn;
struct imsg imsg;
struct mrt xmrt;
+ struct roa roa;
struct rde_rib rr;
struct filterstate state;
struct imsgbuf *i;
@@ -890,6 +891,12 @@ rde_dispatch_imsg_parent(struct imsgbuf *ibuf)
}
last_prefixset = ps;
break;
+ case IMSG_RECONF_ROA_ITEM:
+ if (imsg.hdr.len - IMSG_HEADER_SIZE != sizeof(roa))
+ fatalx("IMSG_RECONF_ROA_ITEM bad len");
+ memcpy(&roa, imsg.data, sizeof(roa));
+ rv = trie_roa_add(&last_prefixset->th, &roa);
+ break;
case IMSG_RECONF_PREFIX_SET_ITEM:
if (imsg.hdr.len - IMSG_HEADER_SIZE != sizeof(psi))
fatalx("IMSG_RECONF_PREFIX_SET_ITEM bad len");