Index | Thread | Search

From:
Alexander Bluhm <bluhm@openbsd.org>
Subject:
Re: ospfd: fix rtlabel refcnt leak in kroute code
To:
tech@openbsd.org
Date:
Thu, 27 Aug 2026 17:25:58 +0200

Download raw body.

Thread
On Thu, Aug 27, 2026 at 10:24:13AM +0200, Claudio Jeker wrote:
> The rtlabel handling in kr_change does not properly adjust the refcnt of
> the label and so labels may be dropped even though still in use.
> On top of this the code does not update the values in case of a change.
> 
> I think there are still a few bits missing, e.g. the reload logic seems to
> be missing as well. Also the RDE does not track the ext_tag per nexthop so
> two routers redistributing the same as-ext LSA with equal metrics but
> different ext_tag will use one or the other tag for all routes.
> 
> Noticed while working on some imsg cleanup.

> +
> +				/* update if label changed */ 
> +				if (kn->r.rtlabel != label) {
> +					if (send_rtmsg(kr_state.fd, RTM_CHANGE,
> +					    &kn->r) == -1)
> +					return (-1);
> +				}

The return (-1) should be indented right of the if.

OK bluhm@