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, 2023
1 parent a59b6e2 commit eb5d349
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 3 deletions.
2 changes: 2 additions & 0 deletions rtr-sw.txt
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ router bgp4 65535
template r monitor bmp
template r dump mrt
template r hostname domain
template r software
template r extended-open
template r extended-update
template r aigp
Expand Down Expand Up @@ -565,6 +566,7 @@ router bgp6 65535
template r monitor bmp
template r dump mrt
template r hostname domain
template r software
template r extended-open
template r extended-update
template r aigp
Expand Down
1 change: 1 addition & 0 deletions src/net/freertr/cfg/cfgRtr.java
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ public class cfgRtr implements Comparator<cfgRtr>, cfgGeneric {
"router bgp[46] .*! no (template|neighbor) .* proxy-profile",
"router bgp[46] .*! no (template|neighbor) .* fall-over",
"router bgp[46] .*! no (template|neighbor) .* hostname",
"router bgp[46] .*! no (template|neighbor) .* software",
"router bgp[46] .*! no (template|neighbor) .* unidirection",
"router bgp[46] .*! no (template|neighbor) .* extended-open",
"router bgp[46] .*! no (template|neighbor) .* extended-update",
Expand Down
5 changes: 4 additions & 1 deletion src/net/freertr/rtr/rtrBgp.java
Original file line number Diff line number Diff line change
Expand Up @@ -3827,7 +3827,7 @@ public userFormat showNeighs(int safi) {
*
* @param mod mode: 1=afi, 2=groups, 3=nexthops, 4=graceful, 5=addpath,
* 6=routerid, 7=buffer, 8=description, 9=hostname, 10=compress, 11=connect,
* 12=resolve, 13=summary, 14=multilab, 15=longlived
* 12=resolve, 13=summary, 14=multilab, 15=longlived, 16=software
* @return list of neighbors
*/
public userFormat showSummary(int mod) {
Expand Down Expand Up @@ -3876,6 +3876,9 @@ public userFormat showSummary(int mod) {
case 14:
l = new userFormat("|", "neighbor|as|rx|tx");
break;
case 16:
l = new userFormat("|", "neighbor|as|software");
break;
default:
return null;
}
Expand Down
3 changes: 3 additions & 0 deletions src/net/freertr/rtr/rtrBgpNeigh.java
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,7 @@ public userFormat getStatus() {
l.add("description|" + description);
l.add("hostname|" + conn.peerHostname);
l.add("domainname|" + conn.peerDomainname);
l.add("software|" + conn.peerSoftware);
l.add("compression|rx=" + (conn.compressRx != null) + ", tx=" + (conn.compressTx != null));
l.add("strict bfd|" + conn.strictBfd);
l.add("graceful got|" + rtrBgpParam.mask2string(conn.peerGrace));
Expand Down Expand Up @@ -1978,6 +1979,8 @@ public String showSummary(int mod) {
return peerAddr + "|" + bits.num2str(remoteAs) + "|" + rtrBgpParam.mask2string(conn.peerMltLab) + "|" + rtrBgpParam.mask2string(multiLabel & addrFams);
case 15:
return peerAddr + "|" + bits.num2str(remoteAs) + "|" + rtrBgpParam.mask2string(conn.peerLlGrace) + "|" + rtrBgpParam.mask2string(llGraceRestart & addrFams);
case 16:
return peerAddr + "|" + bits.num2str(remoteAs) + "|" + conn.peerSoftware;
default:
return null;
}
Expand Down
12 changes: 12 additions & 0 deletions src/net/freertr/rtr/rtrBgpParam.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,11 @@ public abstract class rtrBgpParam {
*/
public int hostname;

/**
* software version
*/
public boolean software;

/**
* extended open
*/
Expand Down Expand Up @@ -1117,6 +1122,7 @@ public void copyFrom(rtrBgpParam src) {
extNextCur = src.extNextCur;
extNextOtr = src.extNextOtr;
hostname = src.hostname;
software = src.software;
extOpen = src.extOpen;
extUpdate = src.extUpdate;
unidirection = src.unidirection;
Expand Down Expand Up @@ -1561,6 +1567,7 @@ public static void getParamHelp(userHelping l) {
getAfiList(l, "4 4,.", "use", true);
l.add(null, "3 4,. hostname advertise hostname capability");
l.add(null, "4 . domain advertise domain too");
l.add(null, "3 . software advertise software version capability");
l.add(null, "3 . extended-open send open in extended format");
l.add(null, "3 . extended-update advertise extended update capability");
l.add(null, "3 . unidirection not advertise when receiving");
Expand Down Expand Up @@ -1743,6 +1750,7 @@ public List<String> getParamCfg(String beg, String nei, int filter) {
s = "domain";
}
cmds.cfgLine(l, hostname < 1, beg, nei + "hostname", s);
cmds.cfgLine(l, !software, beg, nei + "software", "");
cmds.cfgLine(l, !extOpen, beg, nei + "extended-open", "");
cmds.cfgLine(l, !extUpdate, beg, nei + "extended-update", "");
cmds.cfgLine(l, !unidirection, beg, nei + "unidirection", "");
Expand Down Expand Up @@ -2164,6 +2172,10 @@ public boolean setParamCfg(cmds cmd, boolean negated) {
}
return false;
}
if (s.equals("software")) {
software = !negated;
return false;
}
if (s.equals("extended-open")) {
extOpen = !negated;
return false;
Expand Down
15 changes: 15 additions & 0 deletions src/net/freertr/rtr/rtrBgpSpeak.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import net.freertr.util.logger;
import net.freertr.util.syncInt;
import net.freertr.enc.encTlv;
import net.freertr.util.version;

/**
* bgp4 speaker
Expand Down Expand Up @@ -554,6 +555,11 @@ public class rtrBgpSpeak implements rtrBfdClnt, Runnable {
*/
public String peerHostname;

/**
* peer software capability
*/
public String peerSoftware;

/**
* peer domain capability
*/
Expand Down Expand Up @@ -1632,6 +1638,10 @@ public void sendOpen() {
}
rtrBgpUtil.placeCapability(pck, neigh.extOpen, rtrBgpUtil.capaHostname, buf);
}
if (neigh.software) {
byte[] buf = encodeHostname(version.usrAgnt);
rtrBgpUtil.placeCapability(pck, neigh.extOpen, rtrBgpUtil.capaSoftware, buf);
}
if (neigh.bfdTrigger == 2) {
rtrBgpUtil.placeCapability(pck, neigh.extOpen, rtrBgpUtil.capaStrictBfd, new byte[0]);
}
Expand Down Expand Up @@ -1742,6 +1752,11 @@ public boolean parseOpen(packHolder pck) {
bits.byteCopy(tlv.valDat, i + 1, buf, 0, buf.length);
peerDomainname = new String(buf);
break;
case rtrBgpUtil.capaSoftware:
buf = new byte[tlv.valDat[0] & 0xff];
bits.byteCopy(tlv.valDat, 1, buf, 0, buf.length);
peerSoftware = new String(buf);
break;
case rtrBgpUtil.capaStrictBfd:
strictBfd = true;
break;
Expand Down
5 changes: 5 additions & 0 deletions src/net/freertr/rtr/rtrBgpUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,11 @@ private rtrBgpUtil() {
*/
public static final int capaStrictBfd = 74;

/**
* software version
*/
public static final int capaSoftware = 75;

/**
* compression
*/
Expand Down
1 change: 1 addition & 0 deletions src/net/freertr/user/userExec.java
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ private static void getHelpShowIpX(userHelping hl) {
hl.add(null, "5 . buffer list of buffer");
hl.add(null, "5 . description list of description");
hl.add(null, "5 . hostname list of hostname");
hl.add(null, "5 . software list of software");
hl.add(null, "5 . compression list of compression");
hl.add(null, "5 . connection list of connection");
hl.add(null, "5 . rpkisum list of servers");
Expand Down
4 changes: 4 additions & 0 deletions src/net/freertr/user/userShow.java
Original file line number Diff line number Diff line change
Expand Up @@ -3802,6 +3802,10 @@ private void doShowIpXbgp(tabRouteAttr.routeType afi) {
rdr.putStrTab(r.bgp.showSummary(9));
return;
}
if (a.equals("software")) {
rdr.putStrTab(r.bgp.showSummary(16));
return;
}
if (a.equals("compression")) {
rdr.putStrTab(r.bgp.showSummary(10));
return;
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 v23.2.4-cur, done by cs@nop.
-;-;-;2023-02-04 14:48:06, took 00:09:46, with 80 workers, on 3102 cases, 0 failed, 0 traces, 1 retries
-;-;-;2023-02-04 16:10:54, took 00:10:03, with 80 workers, on 3102 cases, 0 failed, 0 traces, 3 retries
-;-;-;./rtr.bin
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 @@ -13,7 +13,7 @@
</style>
<title>tester</title></head><body>
release: freeRouter v23.2.4-cur, done by cs@nop.<br/>
tested: 2023-02-04 14:48:06, took 00:09:46, with 80 workers, on 3102 cases, 0 failed, 0 traces, 1 retries<br/>
tested: 2023-02-04 16:10:54, took 00:10:03, with 80 workers, on 3102 cases, 0 failed, 0 traces, 3 retries<br/>
jvm: ./rtr.bin<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 eb5d349

Please sign in to comment.