From: Alberto Leiva Popper Date: Fri, 6 Mar 2026 18:52:27 +0000 (-0600) Subject: Add separate validation for duplicate ASPA providers X-Git-Tag: 1.7.0.experimental~32 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=24e78dfebd7c7a978dc7fba9bc68115ab231b21a;p=thirdparty%2FFORT-validator.git Add separate validation for duplicate ASPA providers Fixes #166. --- diff --git a/src/object/aspa.c b/src/object/aspa.c index 7e9cef69..0ea50834 100644 --- a/src/object/aspa.c +++ b/src/object/aspa.c @@ -100,9 +100,15 @@ parse_providers(ProviderASSet_t *set, struct aspa *aspa) aspa->customer); goto cancel; } - if (i != 0 && providers[i - 1] >= providers[i]) { - error = pr_val_err("The Provider ASIDs are not listed in ascending order."); - goto cancel; + if (i != 0) { + if (providers[i - 1] == providers[i]) { + error = pr_val_err("Provider ASID '%u' is listed more than once.", providers[i]); + goto cancel; + } + if (providers[i - 1] > providers[i]) { + error = pr_val_err("The Provider ASIDs are not listed in ascending order."); + goto cancel; + } } }