From: Sebastian Benoit Subject: Re: bgpd: add missing error check for IMSG_RECONF_ROA_ITEM To: tech@openbsd.org Cc: cjeker@diehard.n-r-g.com Date: Wed, 12 Nov 2025 17:29:36 +0100 Claudio Jeker(cjeker@diehard.n-r-g.com) on 2025-11-12: > Somehow the check for trie_roa_add failure was lost. > We do the same just log the fact handling in IMSG_RECONF_PREFIX_SET_ITEM. > This should only trigger in out of memory situations. > > Fixes CID 492365 > -- > :wq Claudio > > Index: rde.c > =================================================================== > RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v > diff -u -p -r1.662 rde.c > --- rde.c 12 Nov 2025 15:17:43 -0000 1.662 > +++ rde.c 12 Nov 2025 15:59:28 -0000 > @@ -1144,6 +1144,9 @@ rde_dispatch_imsg_parent(struct imsgbuf > if (imsg_get_data(&imsg, &roa, sizeof(roa)) == -1) > fatalx("IMSG_RECONF_ROA_ITEM bad len"); > rv = trie_roa_add(&last_prefixset->th, &roa); > + if (rv == -1) > + log_warnx("trie_roa_add %s failed", > + log_roa(&roa)); > break; > case IMSG_RECONF_PREFIX_SET_ITEM: > if (imsg_get_data(&imsg, &psi, sizeof(psi)) == -1) > ok benno@ maybe related: i notice that in rde_dispatch_imsg_rtr() under IMSG_RECONF_ROA_ITEM there is a similar pattern where you dont use log_roa() but handroll the printing of a prefix.