}
AsId asId = config.getAsId();
if (asId != null) {
- int asNum = asId.getLocalAs().intValue();
+ long asNum = asId.getLocalAs().longValue();
IpAddress routerId = asId.getRouterId();
Long spt = asId.getStalepathTime();
Boolean afb = asId.isAnnounceFbit();
ps.printf("%nNeighbors%n");
for (Neighbors nbr : neighbors) {
ps.printf("\t%s%n\t\t%-16s %d%n", nbr.getAddress().getValue(),
- ASSTR, nbr.getRemoteAs().intValue());
+ ASSTR, nbr.getRemoteAs());
EbgpMultihop en = nbr.getEbgpMultihop();
if (en != null) {
ps.printf("\t\t%-16s %d%n", EBSTR, en.getNhops().intValue());
return null;
}
if (asNum != null) {
- if (!Commands.isValid(session.getConsole(), asNum, Commands.Validators.INT, AS)) {
+ if (!Commands.isValid(session.getConsole(), asNum, Commands.Validators.ASNUM, AS)) {
return null;
- } else {
- asn = Long.parseLong(asNum);
}
+ asn = Long.parseLong(asNum);
+
}
TcpMd5SignaturePasswordType md5Secret = null;
if (md5PasswordOption != null) {
session.getConsole().println("error: " + AS + " is needed");
return null;
}
- if (!Commands.isValid(session.getConsole(), asNum, Commands.Validators.INT, AS)) {
+ if (!Commands.isValid(session.getConsole(), asNum, Commands.Validators.ASNUM, AS)) {
return null;
}
asn = Long.parseLong(asNum);