Skip to content

Commit

Permalink
automatic commit at releng box
Browse files Browse the repository at this point in the history
  • Loading branch information
mc36 committed Feb 4, 2025
1 parent fda4461 commit 0d3c82e
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 8 deletions.
36 changes: 33 additions & 3 deletions src/org/freertr/serv/servWhois.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public servWhois() {
public static tabGen<userFilter> defaultF;

/**
* defaults filter
* remote servers
*/
public tabGen<servWhoisRem> remotes = new tabGen<servWhoisRem>();

Expand Down Expand Up @@ -81,12 +81,22 @@ public boolean srvDeinit() {
public void srvShRun(String beg, List<String> lst, int filter) {
for (int i = 0; i < remotes.size(); i++) {
servWhoisRem ntry = remotes.get(i);
lst.add(beg + "remote " + ntry);
lst.add(beg + ntry);
}
}

public boolean srvCfgStr(cmds cmd) {
String s = cmd.word();
if (s.equals("local")) {
servWhoisRem ntry = new servWhoisRem();
if (ntry.rng.fromString(cmd.word())) {
cmd.error("bad range");
return false;
}
ntry.opt = cmd.getRemaining();
remotes.put(ntry);
return false;
}
if (s.equals("remote")) {
servWhoisRem ntry = new servWhoisRem();
if (ntry.rng.fromString(cmd.word())) {
Expand All @@ -111,6 +121,15 @@ public boolean srvCfgStr(cmds cmd) {
return true;
}
s = cmd.word();
if (s.equals("local")) {
servWhoisRem ntry = new servWhoisRem();
if (ntry.rng.fromString(cmd.word())) {
cmd.error("bad range");
return false;
}
remotes.del(ntry);
return false;
}
if (s.equals("remote")) {
servWhoisRem ntry = new servWhoisRem();
if (ntry.rng.fromString(cmd.word())) {
Expand All @@ -124,6 +143,9 @@ public boolean srvCfgStr(cmds cmd) {
}

public void srvHelp(userHelping l) {
l.add(null, "1 2 local select local definition");
l.add(null, "2 3 <num> as number range");
l.add(null, "3 . <str> name of asn");
l.add(null, "1 2 remote select remote resolver");
l.add(null, "2 3 <num> as number range");
l.add(null, "3 4 <name:prx> proxy profile to use");
Expand Down Expand Up @@ -152,7 +174,10 @@ class servWhoisRem implements Comparable<servWhoisRem> {
public String opt;

public String toString() {
String a = rng + " " + prx.name + " " + srv;
if (srv == null) {
return "local " + rng + " " + opt;
}
String a = "remote " + rng + " " + prx.name + " " + srv;
if (opt == null) {
return a;
}
Expand Down Expand Up @@ -223,6 +248,10 @@ public void run() {
if (!ntry.rng.matches(n)) {
continue;
}
if (ntry.srv == null) {
m = "" + ntry.opt;
break;
}
clntWhois w = new clntWhois(pipe, ntry.prx, ntry.srv, ntry.opt);
m = w.doQuery(n);
break;
Expand All @@ -247,4 +276,5 @@ public void run() {
logger.traceback(e);
}
}

}
2 changes: 1 addition & 1 deletion src/org/freertr/user/userShow.java
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ public cfgAlias doer() {
a = cmd.word();
int i = bits.str2num(a);
a = clntWhois.asn2name(i, true);
rdr.putStrArr(bits.str2lst("just queried asn " + i + " is " + a + " in " + bits.timePast(tim)));
rdr.putStrArr(bits.str2lst("queried asn " + bits.num2str(i) + " is " + a + " in " + bits.timePast(tim)));
return null;
}
if (a.equals("asn-cache")) {
Expand Down
2 changes: 1 addition & 1 deletion src/rtr.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
url;file;result;test
-;-;-;freeRouter v25.2.4-cur, done by sprscc13@mrn0b0dy.
-;-;-;2025-02-04 17:16:28, took 00:15:07, with 50 workers, on 3634 cases, 0 failed, 0 traces, 2 retries
-;-;-;2025-02-04 17:46:33, took 00:14:46, with 50 workers, on 3634 cases, 0 failed, 0 traces, 1 retries
-;-;-;./rtr.bin, null
http://sources.freertr.org/cfg/basic01.tst;basic01.tst;success;dummy test
http://sources.freertr.org/cfg/basic02.tst;basic02.tst;success;interface with slot
Expand Down
2 changes: 1 addition & 1 deletion src/rtr.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</style>
<title>tester</title></head><body>
release: freeRouter v25.2.4-cur, done by sprscc13@mrn0b0dy.<br/>
tested: 2025-02-04 17:16:28, took 00:15:07, with 50 workers, on 3634 cases, 0 failed, 0 traces, 2 retries<br/>
tested: 2025-02-04 17:46:33, took 00:14:46, with 50 workers, on 3634 cases, 0 failed, 0 traces, 1 retries<br/>
jvm: ./rtr.bin, other: null<br/>
<br/>
<table><thead><tr><td><b>file</b></td><td><b>result</b></td><td><b>test</b></td></tr></thead><tbody>
Expand Down
2 changes: 1 addition & 1 deletion src/rtr8.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
url;file;result;test
-;-;-;freeRouter v25.2.4-cur, done by sprscc13@mrn0b0dy.
-;-;-;2025-02-04 17:27:32, took 00:10:33, with 50 workers, on 700 cases, 0 failed, 0 traces, 0 retries
-;-;-;2025-02-04 17:57:31, took 00:10:27, with 50 workers, on 700 cases, 0 failed, 0 traces, 0 retries
-;-;-;./rtr.bin, udp
http://sources.freertr.org/cfg/p4lang-acl001.tst;p4lang-acl001.tst;success;p4lang: copp
http://sources.freertr.org/cfg/p4lang-acl002.tst;p4lang-acl002.tst;success;p4lang: ingress access list
Expand Down
2 changes: 1 addition & 1 deletion src/rtr8.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</style>
<title>tester</title></head><body>
release: freeRouter v25.2.4-cur, done by sprscc13@mrn0b0dy.<br/>
tested: 2025-02-04 17:27:32, took 00:10:33, with 50 workers, on 700 cases, 0 failed, 0 traces, 0 retries<br/>
tested: 2025-02-04 17:57:31, took 00:10:27, with 50 workers, on 700 cases, 0 failed, 0 traces, 0 retries<br/>
jvm: ./rtr.bin, other: udp<br/>
<br/>
<table><thead><tr><td><b>file</b></td><td><b>result</b></td><td><b>test</b></td></tr></thead><tbody>
Expand Down

0 comments on commit 0d3c82e

Please sign in to comment.