From 2011f94b7688d92cb2e7d0ff697a874cadcd0cd1 Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 11 May 2026 18:41:06 +0000 Subject: [PATCH] In merge_aspa_set() do the MAX_ASPA_SPAS_COUNT check the same way it is done in the rest of the code and by doing so fix a harmless off by one error. OK tb@ --- usr.sbin/bgpd/parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index fade57ddfba..05be645a25a 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.492 2026/05/08 12:03:50 tb Exp $ */ +/* $OpenBSD: parse.y,v 1.493 2026/05/11 18:41:06 claudio Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer @@ -5537,7 +5537,7 @@ merge_aspa_set(uint32_t as, struct aspa_tas_l *tas, time_t expires) RB_INSERT(aspa_tree, &conf->aspa, aspa); } - if (MAX_ASPA_SPAS_COUNT - aspa->num <= tas->num) { + if (tas->num > MAX_ASPA_SPAS_COUNT - aspa->num) { yyerror("too many providers for customer-as %u", as); return -1; }