]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
Reject providers list if AS0 is listed along other ASs
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Wed, 11 Mar 2026 17:37:18 +0000 (11:37 -0600)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Wed, 11 Mar 2026 17:37:18 +0000 (11:37 -0600)
Fixes #167.

src/object/aspa.c

index 0ea508349f4eebc103980094f64013f7609131bf..ed3489c5ca020d86750fdcf1310ea42a5e15cf7d 100644 (file)
@@ -100,6 +100,10 @@ parse_providers(ProviderASSet_t *set, struct aspa *aspa)
                            aspa->customer);
                        goto cancel;
                }
+               if (providers[i] == 0 && set->list.count != 1) {
+                       error = pr_val_err("Provider ASID '%u' is not in a single item list.");
+                       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]);