Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: bgpd: copy aspa state as well in path_copy
To:
tech@openbsd.org
Date:
Wed, 20 May 2026 21:06:12 +0200

Download raw body.

Thread
On Wed, May 20, 2026 at 08:57:00PM +0200, Claudio Jeker wrote:
> The aspa_state and aspa_generation members of struct rde_aspath are not
> part of the path hash and are considered mutable during life time of a
> linked path. Still they should be copied in path_copy over to the new path
> since path_copy is used to setup the filterstate but also to put the
> aspath object into the hash table (make it linked).
> 
> The missing copy just causes delayed updates of ASPA states in the worst
> case. It should not result in bad aspa states (e.g. invalid instead of
> unknown).

ok tb

> -- 
> :wq Claudio
> 
> Index: rde_rib.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/bgpd/rde_rib.c,v
> diff -u -p -r1.294 rde_rib.c
> --- rde_rib.c	14 May 2026 18:47:32 -0000	1.294
> +++ rde_rib.c	20 May 2026 18:40:45 -0000
> @@ -756,6 +756,9 @@ path_copy(struct rde_aspath *dst, const 
>  	dst->pftableid = pftable_ref(src->pftableid);
>  	dst->origin = src->origin;
>  
> +	dst->aspa_state = src->aspa_state;
> +	dst->aspa_generation = src->aspa_generation;
> +
>  	attr_copy(dst, src);
>  
>  	return (dst);
>