Skip to content

Commit

Permalink
add support for 32 bit AS numbers to community numbers in routing pol…
Browse files Browse the repository at this point in the history
…icies
  • Loading branch information
ericparton committed Apr 11, 2024
1 parent caf72d4 commit 2882f5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/ripe/db/whois/common/rpsl/ParserHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,14 @@ public static void validateIpv6(final String yytext) {

/**
* Verify a community number.
* The definition is (2-octet):(2-octet), only 16-bit AS numbers are allowed.
* The definition is (2-octet):(2-octet), 16-bit and 32-bit AS numbers are allowed.
* @param yytext
*/
public static void validateCommunity(final String yytext) {
final int colon = yytext.indexOf(':');

final long from = Long.valueOf(yytext.substring(0, colon));
if (from > MAX_16BIT_NUMBER) {
if (from > MAX_32BIT_NUMBER) {
syntaxError("Community number " + yytext + " contains an invalid number");
}

Expand Down

0 comments on commit 2882f5c

Please sign in to comment.