Skip to content

Commit

Permalink
reject route-set members that are as-sets or as numbers since the RFC…
Browse files Browse the repository at this point in the history
… does not allow this
  • Loading branch information
ericparton committed Mar 10, 2021
1 parent 56e8181 commit caf72d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -713,10 +713,6 @@ public boolean matches(final ObjectType objectType, final String value) {
return true;
}

if (AS_NUMBER_SYNTAX.matches(objectType, value) || AS_SET_SYNTAX.matches(objectType, value)) {
return true;
}

if (ADDRESS_PREFIX_RANGE_SYNTAX.matches(objectType, value)) {
final AddressPrefixRange apr = AddressPrefixRange.parse(value);
if ((apr.getIpInterval() instanceof Ipv4Resource) || (allowIpv6 && apr.getIpInterval() instanceof Ipv6Resource)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,8 @@ public void members() throws Exception {
verifySuccess(ObjectType.ROUTE_SET, AttributeType.MEMBERS, "RS-SIX-BLOG^16-24");
verifySuccess(ObjectType.ROUTE_SET, AttributeType.MEMBERS, "172.184.0.0/13, 172.184.0.0/23^24");
verifySuccess(ObjectType.ROUTE_SET, AttributeType.MEMBERS, "AS13646:RS-TEST");
verifySuccess(ObjectType.ROUTE_SET, AttributeType.MEMBERS, "AS13646");
verifySuccess(ObjectType.ROUTE_SET, AttributeType.MEMBERS, "AS-COFFEE,AS3333");
verifyFailure(ObjectType.ROUTE_SET, AttributeType.MEMBERS, "AS13646");
verifyFailure(ObjectType.ROUTE_SET, AttributeType.MEMBERS, "AS-COFFEE,AS3333");
verifyFailure(ObjectType.ROUTE_SET, AttributeType.MEMBERS, "2a00:10C0::/32");
verifyFailure(ObjectType.ROUTE_SET, AttributeType.MEMBERS, "FLTR-TESTNET");

Expand Down

0 comments on commit caf72d4

Please sign in to comment.