-/* $OpenBSD: bgpd.c,v 1.258 2023/04/19 07:12:22 claudio Exp $ */
+/* $OpenBSD: bgpd.c,v 1.259 2023/08/16 08:26:35 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
if (imsg_compose(ibuf_rtr, IMSG_RECONF_ASPA_TAS, 0, 0,
-1, aspa->tas, sizeof(*aspa->tas) * aspa->num) == -1)
return (-1);
- if (imsg_compose(ibuf_rtr, IMSG_RECONF_ASPA_TAS_AID,
- 0, 0, -1, aspa->tas_aid, aspa->num) == -1)
- return (-1);
if (imsg_compose(ibuf_rtr, IMSG_RECONF_ASPA_DONE, 0, 0, -1,
NULL, 0) == -1)
return -1;
-/* $OpenBSD: bgpd.h,v 1.475 2023/04/20 15:44:45 claudio Exp $ */
+/* $OpenBSD: bgpd.h,v 1.476 2023/08/16 08:26:35 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
IMSG_RECONF_ROA_ITEM,
IMSG_RECONF_ASPA,
IMSG_RECONF_ASPA_TAS,
- IMSG_RECONF_ASPA_TAS_AID,
IMSG_RECONF_ASPA_DONE,
IMSG_RECONF_ASPA_PREP,
IMSG_RECONF_RTR_CONFIG,
uint32_t as;
uint32_t num;
uint32_t *tas;
- uint8_t *tas_aid;
RB_ENTRY(aspa_set) entry;
};
-#define TAS_AID_SIZE(n) (((n) + 15) / 16 * sizeof(uint32_t))
struct aspa_prep {
size_t datasize;
-/* $OpenBSD: config.c,v 1.107 2023/04/18 12:11:27 claudio Exp $ */
+/* $OpenBSD: config.c,v 1.108 2023/08/16 08:26:35 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
if (aspa == NULL)
return;
free(aspa->tas);
- free(aspa->tas_aid);
free(aspa);
}
-/* $OpenBSD: parse.y,v 1.454 2023/04/28 13:23:52 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.455 2023/08/16 08:26:35 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
struct aspa_tas_l *next;
uint32_t as;
uint32_t num;
- uint8_t aid;
};
struct flowspec_context {
if (($$ = calloc(1, sizeof(*$$))) == NULL)
fatal(NULL);
$$->as = $1;
- $$->aid = AID_UNSPEC;
$$->num = 1;
}
| as4number_any af {
if (($$ = calloc(1, sizeof(*$$))) == NULL)
fatal(NULL);
$$->as = $1;
- $$->aid = $2;
$$->num = 1;
}
;
{
struct aspa_set *aspa, needle = { .as = as };
uint32_t i, num, *newtas;
- uint8_t *newtasaid = NULL;
aspa = RB_FIND(aspa_tree, &conf->aspa, &needle);
if (aspa == NULL) {
yyerror("out of memory");
return -1;
}
- newtasaid = recallocarray(aspa->tas_aid, aspa->num, num, 1);
- if (newtasaid == NULL) {
- free(newtas);
- yyerror("out of memory");
- return -1;
- }
-
/* fill starting at the end since the tas list is reversed */
if (num > 0) {
- for (i = num - 1; tas; tas = tas->next, i--) {
+ for (i = num - 1; tas; tas = tas->next, i--)
newtas[i] = tas->as;
- if (tas->aid != AID_UNSPEC)
- newtasaid[i] = tas->aid;
- }
}
aspa->num = num;
aspa->tas = newtas;
- aspa->tas_aid = newtasaid;
/* take the longest expiry time, same logic as for ROA entries */
if (aspa->expires != 0 && expires != 0 && expires > aspa->expires)
aspa->expires = expires;
-/* $OpenBSD: printconf.c,v 1.167 2023/04/28 13:23:52 claudio Exp $ */
+/* $OpenBSD: printconf.c,v 1.168 2023/08/16 08:26:35 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
if (aspa->expires != 0)
printf(" expires %lld", (long long)aspa->expires);
printf(" provider-as { ");
- for (i = 0; i < aspa->num; i++) {
+ for (i = 0; i < aspa->num; i++)
printf("%s ", log_as(aspa->tas[i]));
- if (aspa->tas_aid[i] != AID_UNSPEC)
- printf("%s ", print_af(aspa->tas_aid[i]));
- }
printf("}");
}
printf("\n}\n\n");
-/* $OpenBSD: rde.c,v 1.609 2023/08/04 09:20:12 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.610 2023/08/16 08:26:35 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
memcpy(aspa->tas, imsg.data,
aspa->num * sizeof(uint32_t));
break;
- case IMSG_RECONF_ASPA_TAS_AID:
- if (aspa == NULL)
- fatalx("unexpected IMSG_RECONF_ASPA_TAS_AID");
- if (imsg.hdr.len - IMSG_HEADER_SIZE !=
- TAS_AID_SIZE(aspa->num))
- fatalx("IMSG_RECONF_ASPA_TAS_AID bad len");
- aspa->tas_aid = malloc(TAS_AID_SIZE(aspa->num));
- if (aspa->tas_aid == NULL)
- fatal("IMSG_RECONF_ASPA_TAS_AID");
- memcpy(aspa->tas_aid, imsg.data,
- TAS_AID_SIZE(aspa->num));
- break;
case IMSG_RECONF_ASPA_DONE:
if (aspa_new == NULL)
fatalx("unexpected IMSG_RECONF_ASPA");
aspa_add_set(aspa_new, aspa->as, aspa->tas,
- aspa->num, (void *)aspa->tas_aid);
+ aspa->num);
free_aspa(aspa);
aspa = NULL;
break;
if (peer->role == ROLE_NONE)
return ASPA_UNKNOWN;
- switch (aid) {
- case AID_INET:
- if (peer->role == ROLE_CUSTOMER)
- return asp->aspa_state.downup_v4;
- else
- return asp->aspa_state.onlyup_v4;
- case AID_INET6:
- if (peer->role == ROLE_CUSTOMER)
- return asp->aspa_state.downup_v6;
- else
- return asp->aspa_state.onlyup_v6;
- default:
- return ASPA_NEVER_KNOWN; /* not reachable */
- }
+ if (peer->role == ROLE_CUSTOMER)
+ return asp->aspa_state.downup;
+ else
+ return asp->aspa_state.onlyup;
}
/*
-/* $OpenBSD: rde.h,v 1.295 2023/07/12 14:45:43 claudio Exp $ */
+/* $OpenBSD: rde.h,v 1.296 2023/08/16 08:26:35 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and
struct rde_aspa;
struct rde_aspa_state {
- uint8_t onlyup_v4;
- uint8_t downup_v4;
- uint8_t onlyup_v6;
- uint8_t downup_v6;
+ uint8_t onlyup;
+ uint8_t downup;
};
#define AS_SET 1
struct rde_aspa_state *);
struct rde_aspa *aspa_table_prep(uint32_t, size_t);
void aspa_add_set(struct rde_aspa *, uint32_t, const uint32_t *,
- uint32_t, const uint32_t *);
+ uint32_t);
void aspa_table_free(struct rde_aspa *);
void aspa_table_stats(const struct rde_aspa *,
struct ctl_show_set *);
-/* $OpenBSD: rde_aspa.c,v 1.4 2023/04/20 15:44:45 claudio Exp $ */
+/* $OpenBSD: rde_aspa.c,v 1.5 2023/08/16 08:26:35 claudio Exp $ */
/*
* Copyright (c) 2022 Claudio Jeker <claudio@openbsd.org>
#include "bgpd.h"
#include "rde.h"
-#define UNKNOWN 0x0
-#define NOT_PROVIDER 0x1
-#define PROVIDER 0x2
-
-#define CP(x, y) (x | (y << 4))
-#define CP_GET(x, i) ((x >> (i * 4)) & 0xf)
+enum cp_state {
+ UNKNOWN,
+ NOT_PROVIDER,
+ PROVIDER,
+};
struct rde_aspa_set {
uint32_t as;
uint32_t num;
uint32_t *pas;
- uint32_t *pas_aid;
int next;
};
* Returns UNKNOWN if cas is not in the ra table or the aid is out of range.
* Returns PROVIDER if pas is registered for cas for the specified aid.
* Retruns NOT_PROVIDER otherwise.
- * The returned value includes the result for both IPv4 and IPv6 and needs
- * to be looked at with CP_GET.
* This function is called very frequently and needs to be fast.
*/
-static uint8_t
+static enum cp_state
aspa_cp_lookup(struct rde_aspa *ra, uint32_t cas, uint32_t pas)
{
struct rde_aspa_set *aspa;
aspa = aspa_lookup(ra, cas);
if (aspa == NULL)
- return CP(UNKNOWN, UNKNOWN);
+ return UNKNOWN;
if (aspa->num < 16) {
for (i = 0; i < aspa->num; i++) {
if (aspa->pas[i] == pas)
break;
if (aspa->pas[i] > pas)
- return CP(NOT_PROVIDER, NOT_PROVIDER);
+ return NOT_PROVIDER;
}
if (i == aspa->num)
- return CP(NOT_PROVIDER, NOT_PROVIDER);
+ return NOT_PROVIDER;
} else {
uint32_t lim, x;
for (i = 0, lim = aspa->num; lim != 0; lim /= 2) {
}
}
if (lim == 0)
- return CP(NOT_PROVIDER, NOT_PROVIDER);
+ return NOT_PROVIDER;
}
- if (aspa->pas_aid == NULL)
- return CP(PROVIDER, PROVIDER);
- switch (aspa->pas_aid[i / 16] >> ((i % 16) * 2) & 0x3) {
- case 0x1:
- return CP(PROVIDER, NOT_PROVIDER);
- case 0x2:
- return CP(NOT_PROVIDER, PROVIDER);
- case 0x3:
- return CP(PROVIDER, PROVIDER);
- default:
- fatalx("impossible state in aspa_cp_lookup");
- }
+ return PROVIDER;
}
/*
aspa_check_aspath(struct rde_aspa *ra, struct aspath *a, struct aspa_state *s)
{
uint8_t *seg;
- int afi;
uint32_t as, prevas = 0;
uint16_t len, seg_size;
- uint8_t i, r, seg_type, seg_len;
+ uint8_t i, seg_type, seg_len;
/* the neighbor-as itself is by definition valid */
- s[0].ndown_p = 1;
- s[1].ndown_p = 1;
+ s->ndown_p = 1;
/*
* Walk aspath and validate if necessary both up- and down-ramp.
if (as == prevas)
continue; /* skip prepends */
- s[0].nhops++;
- s[1].nhops++;
+ s->nhops++;
if (prevas == 0) {
prevas = as; /* skip left-most AS */
continue;
* node and the right-most provider node
* for which all nodes before are valid.
*/
- r = aspa_cp_lookup(ra, prevas, as);
- for (afi = 0; afi < 2; afi++) {
- switch (CP_GET(r, afi)) {
- case UNKNOWN:
- if (s[afi].ndown_u == 0)
- s[afi].ndown_u = s[afi].nhops;
- break;
- case PROVIDER:
- if (s[afi].ndown_p + 1 == s[afi].nhops)
- s[afi].ndown_p = s[afi].nhops;
- break;
- case NOT_PROVIDER:
- if (s[afi].ndown_np == 0)
- s[afi].ndown_np = s[afi].nhops;
- break;
- }
+ switch (aspa_cp_lookup(ra, prevas, as)) {
+ case UNKNOWN:
+ if (s->ndown_u == 0)
+ s->ndown_u = s->nhops;
+ break;
+ case PROVIDER:
+ if (s->ndown_p + 1 == s->nhops)
+ s->ndown_p = s->nhops;
+ break;
+ case NOT_PROVIDER:
+ if (s->ndown_np == 0)
+ s->ndown_np = s->nhops;
+ break;
}
/*
* We recorde the nhops value of prevas,
* that's why the use of nhops - 1.
*/
- r = aspa_cp_lookup(ra, as, prevas);
- for (afi = 0; afi < 2; afi++) {
- switch (CP_GET(r, afi)) {
- case UNKNOWN:
- s[afi].nup_p = 0;
- s[afi].nup_u = s[afi].nhops - 1;
- break;
- case PROVIDER:
- if (s[afi].nup_p == 0)
- s[afi].nup_p = s[afi].nhops - 1;
- break;
- case NOT_PROVIDER:
- s[afi].nup_p = 0;
- s[afi].nup_np = s[afi].nhops - 1;
- break;
- }
+ switch (aspa_cp_lookup(ra, as, prevas)) {
+ case UNKNOWN:
+ s->nup_p = 0;
+ s->nup_u = s->nhops - 1;
+ break;
+ case PROVIDER:
+ if (s->nup_p == 0)
+ s->nup_p = s->nhops - 1;
+ break;
+ case NOT_PROVIDER:
+ s->nup_p = 0;
+ s->nup_np = s->nhops - 1;
+ break;
}
prevas = as;
}
}
/* the source-as itself is by definition valid */
- if (s[0].nup_p == 0)
- s[0].nup_p = s[0].nhops;
- if (s[1].nup_p == 0)
- s[1].nup_p = s[1].nhops;
+ if (s->nup_p == 0)
+ s->nup_p = s->nhops;
return 0;
}
/*
* Validate an aspath against the aspa_set *ra.
* Returns ASPA_VALID if the aspath is valid, ASPA_UNKNOWN if the
- * aspath contains hops with unknown relation and invalid for
+ * aspath contains hops with unknown relation and ASPA_INVALID for
* empty aspaths, aspath with AS_SET and aspaths that fail validation.
*/
void
aspa_validation(struct rde_aspa *ra, struct aspath *a,
struct rde_aspa_state *vstate)
{
- struct aspa_state state[2] = { 0 };
+ struct aspa_state state = { 0 };
/* no aspa table, evrything is unknown */
if (ra == NULL) {
- memset(vstate, ASPA_UNKNOWN, 4);
+ memset(vstate, ASPA_UNKNOWN, sizeof(*vstate));
return;
}
/* empty ASPATHs are always invalid */
if (aspath_length(a) == 0) {
- memset(vstate, ASPA_INVALID, 4);
+ memset(vstate, ASPA_INVALID, sizeof(*vstate));
return;
}
- if (aspa_check_aspath(ra, a, state) == -1) {
- memset(vstate, ASPA_INVALID, 4);
+ if (aspa_check_aspath(ra, a, &state) == -1) {
+ memset(vstate, ASPA_INVALID, sizeof(*vstate));
return;
}
- aspa_check_finalize(state, &vstate->onlyup_v4, &vstate->downup_v4);
- aspa_check_finalize(state + 1, &vstate->onlyup_v6, &vstate->downup_v6);
+ aspa_check_finalize(&state, &vstate->onlyup, &vstate->downup);
}
/*
*/
void
aspa_add_set(struct rde_aspa *ra, uint32_t cas, const uint32_t *pas,
- uint32_t pascnt, const uint32_t *pas_aid)
+ uint32_t pascnt)
{
struct rde_aspa_set *aspa;
uint32_t h, i;
aspa->pas = ra->data + ra->curdata;
for (i = 0; i < pascnt; i++)
ra->data[ra->curdata++] = pas[i];
-
- /* nobody in their right mind has per afi specific data */
- if (pas_aid != NULL) {
- /* 2 bits per entry rounded to next uint32_t */
- if (ra->maxdata - ra->curdata <
- TAS_AID_SIZE(pascnt) / sizeof(ra->data[0]))
- fatalx("aspa set data overflow");
-
- aspa->pas_aid = ra->data + ra->curdata;
- memcpy(aspa->pas_aid, pas_aid, TAS_AID_SIZE(pascnt));
- ra->curdata += TAS_AID_SIZE(pascnt) / sizeof(ra->data[0]);
- }
}
void
}
/*
- * Return true if the two rde_aspa tables are contain the same data.
+ * Return true if the two rde_aspa tables contain the same data.
*/
int
aspa_table_equal(const struct rde_aspa *ra, const struct rde_aspa *rb)
-/* $OpenBSD: rtr.c,v 1.15 2023/05/05 10:48:16 claudio Exp $ */
+/* $OpenBSD: rtr.c,v 1.16 2023/08/16 08:26:35 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
/*
* Add an asnum to the aspa_set. The aspa_set is sorted by asnum.
- * The aid is altered to AID_UNSPEC (match for both v4 and v6) if
- * the current aid and the one passed do not match.
*/
static void
-aspa_set_entry(struct aspa_set *aspa, uint32_t asnum, uint8_t aid)
+aspa_set_entry(struct aspa_set *aspa, uint32_t asnum)
{
uint32_t i, num, *newtas;
- uint8_t *newtasaid;
-
- if (aid != AID_UNSPEC && aid != AID_INET && aid != AID_INET6)
- fatalx("aspa set with invalid AFI %s", aid2str(aid));
for (i = 0; i < aspa->num; i++) {
if (asnum < aspa->tas[i])
break;
- if (asnum == aspa->tas[i]) {
- if (aspa->tas_aid[i] != aid)
- aspa->tas_aid[i] = AID_UNSPEC;
+ if (asnum == aspa->tas[i])
return;
- }
}
num = aspa->num + 1;
newtas = recallocarray(aspa->tas, aspa->num, num, sizeof(uint32_t));
- newtasaid = recallocarray(aspa->tas_aid, aspa->num, num, 1);
- if (newtas == NULL || newtasaid == NULL)
+ if (newtas == NULL)
fatal("aspa_set merge");
if (i < aspa->num) {
memmove(newtas + i + 1, newtas + i,
(aspa->num - i) * sizeof(uint32_t));
- memmove(newtasaid + i + 1, newtasaid + i, (aspa->num - i));
}
newtas[i] = asnum;
- newtasaid[i] = aid;
aspa->num = num;
aspa->tas = newtas;
- aspa->tas_aid = newtasaid;
}
/*
}
for (i = 0; i < mergeset->num; i++)
- aspa_set_entry(aspa, mergeset->tas[i], mergeset->tas_aid[i]);
+ aspa_set_entry(aspa, mergeset->tas[i]);
}
void
memcpy(aspa->tas, imsg.data,
aspa->num * sizeof(*aspa->tas));
break;
- case IMSG_RECONF_ASPA_TAS_AID:
- if (aspa == NULL)
- fatalx("unexpected IMSG_RECONF_ASPA_TAS_ID");
- if (imsg.hdr.len - IMSG_HEADER_SIZE != aspa->num)
- fatalx("IMSG_RECONF_ASPA_TAS_AID bad len");
- aspa->tas_aid = malloc(aspa->num);
- if (aspa->tas_aid == NULL)
- fatal("aspa tas aid alloc");
- memcpy(aspa->tas_aid, imsg.data, aspa->num);
- break;
case IMSG_RECONF_ASPA_DONE:
if (aspa == NULL)
fatalx("unexpected IMSG_RECONF_ASPA_DONE");
* if no extra aid masks are needed.
*/
static size_t
-rtr_aspa_set_prep(struct aspa_set *aspa)
+rtr_aspa_set_size(struct aspa_set *aspa)
{
- uint32_t i, mask = 0;
- uint8_t *tas_aid;
- int needafi = 0;
- size_t s;
-
- s = aspa->num * sizeof(uint32_t);
-
- if ((tas_aid = malloc(TAS_AID_SIZE(aspa->num))) == NULL)
- fatal("tas_aid alloc");
-
- for (i = 0; i < aspa->num; i++) {
- switch (aspa->tas_aid[i]) {
- case AID_INET:
- needafi = 1;
- mask |= 0x1 << ((i % 16) * 2);
- break;
- case AID_INET6:
- needafi = 1;
- mask |= 0x2 << ((i % 16) * 2);
- break;
- default:
- mask |= 0x3 << ((i % 16) * 2);
- break;
- }
- if (i % 16 == 15) {
- memcpy(tas_aid + (i / 16) * sizeof(mask), &mask,
- sizeof(mask));
- mask = 0;
- }
- }
-
- free(aspa->tas_aid);
- aspa->tas_aid = NULL;
-
- if (!needafi) {
- free(tas_aid);
- } else {
- if (aspa->num % 16 != 0)
- memcpy(tas_aid + (aspa->num / 16) * sizeof(mask),
- &mask, sizeof(mask));
- aspa->tas_aid = tas_aid;
- s += TAS_AID_SIZE(aspa->num);
- }
-
- return s;
+ return aspa->num * sizeof(uint32_t);
}
/*
rtr_aspa_merge(&at);
RB_FOREACH(aspa, aspa_tree, &at) {
- ap.datasize += rtr_aspa_set_prep(aspa);
+ ap.datasize += rtr_aspa_set_size(aspa);
ap.entries++;
}
&as, sizeof(as));
imsg_compose(ibuf_rde, IMSG_RECONF_ASPA_TAS, 0, 0, -1,
aspa->tas, aspa->num * sizeof(*aspa->tas));
- if (aspa->tas_aid)
- imsg_compose(ibuf_rde, IMSG_RECONF_ASPA_TAS_AID, 0, 0,
- -1, aspa->tas_aid, TAS_AID_SIZE(aspa->num));
imsg_compose(ibuf_rde, IMSG_RECONF_ASPA_DONE, 0, 0, -1,
NULL, 0);
}
-/* $OpenBSD: rtr_proto.c,v 1.16 2023/03/28 12:15:23 claudio Exp $ */
+/* $OpenBSD: rtr_proto.c,v 1.17 2023/08/16 08:26:35 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
TAILQ_ENTRY(rtr_session) entry;
char descr[PEER_DESCR_LEN];
struct roa_tree roa_set;
- struct aspa_tree aspa_v4;
- struct aspa_tree aspa_v6;
+ struct aspa_tree aspa;
+ struct aspa_tree aspa_oldv6;
struct ibuf_read r;
struct msgbuf w;
struct timer_head timers;
rs->session_id = -1;
timer_stop(&rs->timers, Timer_Rtr_Expire);
free_roatree(&rs->roa_set);
- free_aspatree(&rs->aspa_v4);
- free_aspatree(&rs->aspa_v6);
+ free_aspatree(&rs->aspa);
+ free_aspatree(&rs->aspa_oldv6);
}
static struct ibuf *
struct aspa_set *aspa, *a;
size_t offset;
uint16_t cnt, i;
- uint8_t aid;
memcpy(&rtr_aspa, buf + sizeof(struct rtr_header), sizeof(rtr_aspa));
offset = sizeof(struct rtr_header) + sizeof(rtr_aspa);
}
if (rtr_aspa.afi_flags & FLAG_AFI_V6) {
- aid = AID_INET6;
- aspatree = &rs->aspa_v6;
+ aspatree = &rs->aspa_oldv6;
} else {
- aid = AID_INET;
- aspatree = &rs->aspa_v4;
+ aspatree = &rs->aspa;
}
/* create aspa_set entry from the rtr aspa pdu */
aspa->as = ntohl(rtr_aspa.cas);
aspa->num = cnt;
if (cnt > 0) {
- if ((aspa->tas = calloc(cnt, sizeof(uint32_t))) == NULL ||
- (aspa->tas_aid = calloc(cnt, 1)) == NULL) {
+ if ((aspa->tas = calloc(cnt, sizeof(uint32_t))) == NULL) {
free_aspa(aspa);
log_warn("rtr %s: received %s",
log_rtr(rs), log_rtr_type(ASPA));
memcpy(&tas, buf + offset + i * sizeof(tas),
sizeof(tas));
aspa->tas[i] = ntohl(tas);
- aspa->tas_aid[i] = aid;
}
}
fatal("RTR session %s", descr);
RB_INIT(&rs->roa_set);
- RB_INIT(&rs->aspa_v4);
- RB_INIT(&rs->aspa_v6);
+ RB_INIT(&rs->aspa);
+ RB_INIT(&rs->aspa_oldv6);
TAILQ_INIT(&rs->timers);
msgbuf_init(&rs->w);
struct aspa_set *aspa;
TAILQ_FOREACH(rs, &rtrs, entry) {
- RB_FOREACH(aspa, aspa_tree, &rs->aspa_v4)
+ RB_FOREACH(aspa, aspa_tree, &rs->aspa)
rtr_aspa_insert(at, aspa);
- RB_FOREACH(aspa, aspa_tree, &rs->aspa_v6)
+ RB_FOREACH(aspa, aspa_tree, &rs->aspa_oldv6)
rtr_aspa_insert(at, aspa);
}
}