From: claudio Date: Fri, 16 Apr 2021 06:20:29 +0000 (+0000) Subject: Add back IMSG_RECONF_ROA_ITEM in the parent imsg handler. It is needed X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9a30bd65cb1ec3cb87b52c9fb878e121b91badd9;p=openbsd Add back IMSG_RECONF_ROA_ITEM in the parent imsg handler. It is needed for origin-sets. Found by and reminder procter@ OK deraadt@ --- 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 @@ -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");