summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_rib.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2023-01-24 11:28:42 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2023-01-24 11:28:42 +0000
commitb97be236bfc4ace1217afed644f974303e7337f1 (patch)
tree874d42a4683548574a5873c001a975786516780a /usr.sbin/bgpd/rde_rib.c
parent698a63e4c128d0a57fa5427dbdebce27f7b4e713 (diff)
Implement ASPA validation and reload logic on ASPA set changes.
For this use the validation state (vstate) in struct prefix and struct filterstate to store both the ASPA and ROA validity. Introduce helper functions to set and get the various states for struct prefix and make sure struct filterstate is also setup properly. Change the ASPA state in rde_aspath to be AFI/AID and role independent by storing all 4 possible outcomes. Also add a ASPA generation count which is used to update the rde_aspath ASPA state cache on reloads. Rework the rde_aspa.c code to be AFI/AID and role independent. Doing this for roles is trivial but AFI switch goes deep and is so unnecessary. The reload is combined with the ROA reload logic and renamed to RPKI softreload. OK tb@
Diffstat (limited to 'usr.sbin/bgpd/rde_rib.c')
-rw-r--r--usr.sbin/bgpd/rde_rib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c
index 83c58939b0d..490752151e5 100644
--- a/usr.sbin/bgpd/rde_rib.c
+++ b/usr.sbin/bgpd/rde_rib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_rib.c,v 1.253 2023/01/20 10:28:22 claudio Exp $ */
+/* $OpenBSD: rde_rib.c,v 1.254 2023/01/24 11:28:41 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -636,6 +636,8 @@ path_compare(struct rde_aspath *a, struct rde_aspath *b)
if (a->pftableid < b->pftableid)
return (-1);
+ /* no need to check aspa_state or aspa_generation */
+
r = aspath_compare(a->aspath, b->aspath);
if (r > 0)
return (1);