summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_peer.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_peer.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_peer.c')
-rw-r--r--usr.sbin/bgpd/rde_peer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/rde_peer.c b/usr.sbin/bgpd/rde_peer.c
index eb8d6f547c5..8f988713f6e 100644
--- a/usr.sbin/bgpd/rde_peer.c
+++ b/usr.sbin/bgpd/rde_peer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_peer.c,v 1.26 2023/01/18 13:20:01 claudio Exp $ */
+/* $OpenBSD: rde_peer.c,v 1.27 2023/01/24 11:28:41 claudio Exp $ */
/*
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
@@ -166,6 +166,7 @@ peer_add(uint32_t id, struct peer_config *p_conf)
fatalx("King Bula's new peer met an unknown RIB");
peer->state = PEER_NONE;
peer->eval = peer->conf.eval;
+ peer->role = peer->conf.role;
peer->export_type = peer->conf.export_type;
peer->flags = peer->conf.flags;
SIMPLEQ_INIT(&peer->imsg_queue);