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 16, 2025
1 parent 9b7929e commit 8cd0491
Show file tree
Hide file tree
Showing 10 changed files with 95 additions and 6 deletions.
2 changes: 2 additions & 0 deletions rtr-sw.txt
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ router bgp4 65535 vrf v1
template r pe-distinguisher
template r aspath-limit
template r nsh-chain
template r domain-path
template r bfd-discriminator
template r tunenc
template r attribset
Expand Down Expand Up @@ -647,6 +648,7 @@ router bgp6 65535 vrf v1
template r pe-distinguisher
template r aspath-limit
template r nsh-chain
template r domain-path
template r bfd-discriminator
template r tunenc
template r attribset
Expand Down
1 change: 1 addition & 0 deletions src/org/freertr/cfg/cfgRtr.java
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ public class cfgRtr implements Comparable<cfgRtr>, cfgGeneric {
"router bgp[46] .*!" + cmds.tabulator + cmds.negated + cmds.tabulator + "(template|neighbor) .* pe-distinguisher",
"router bgp[46] .*!" + cmds.tabulator + cmds.negated + cmds.tabulator + "(template|neighbor) .* aspath-limit",
"router bgp[46] .*!" + cmds.tabulator + cmds.negated + cmds.tabulator + "(template|neighbor) .* nsh-chain",
"router bgp[46] .*!" + cmds.tabulator + cmds.negated + cmds.tabulator + "(template|neighbor) .* domain-path",
"router bgp[46] .*!" + cmds.tabulator + cmds.negated + cmds.tabulator + "(template|neighbor) .* bfd-discriminator",
"router bgp[46] .*!" + cmds.tabulator + cmds.negated + cmds.tabulator + "(template|neighbor) .* tunenc",
"router bgp[46] .*!" + cmds.tabulator + cmds.negated + cmds.tabulator + "(template|neighbor) .* linkstate",
Expand Down
3 changes: 3 additions & 0 deletions src/org/freertr/rtr/rtrBgpGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,9 @@ private void clearAttribs(tabRouteAttr<addrIP> ntry) {
if (!nshChain) {
ntry.nshChain = null;
}
if (!domainPath) {
ntry.domainPath = null;
}
if (!bfdDiscr) {
ntry.bfdDiscr = null;
}
Expand Down
15 changes: 15 additions & 0 deletions src/org/freertr/rtr/rtrBgpParam.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ public abstract class rtrBgpParam {
*/
public boolean nshChain;

/**
* send domain path
*/
public boolean domainPath;

/**
* send bfd discriminator
*/
Expand Down Expand Up @@ -1323,6 +1328,7 @@ public void copyFrom(rtrBgpParam src) {
peDist = src.peDist;
pathLim = src.pathLim;
nshChain = src.nshChain;
domainPath = src.domainPath;
bfdDiscr = src.bfdDiscr;
tunEnc = src.tunEnc;
lnkSta = src.lnkSta;
Expand Down Expand Up @@ -1529,6 +1535,9 @@ public boolean sameOutput(rtrBgpParam src) {
if (nshChain != src.nshChain) {
return true;
}
if (domainPath != src.domainPath) {
return true;
}
if (bfdDiscr != src.bfdDiscr) {
return true;
}
Expand Down Expand Up @@ -1861,6 +1870,7 @@ public static void getParamHelp(userHelping l) {
l.add(null, "3 . pe-distinguisher send pe distinguisher attribute");
l.add(null, "3 . aspath-limit send as path limit attribute");
l.add(null, "3 . nsh-chain send nsh service chain attribute");
l.add(null, "3 . domain-path send domain path attribute");
l.add(null, "3 . bfd-discriminator send bfd discriminator attribute");
l.add(null, "3 . tunenc send tunnel encapsulation attribute");
l.add(null, "3 . linkstate send link state attribute");
Expand Down Expand Up @@ -2160,6 +2170,7 @@ public List<String> getParamCfg(String beg, String nei, int filter) {
cmds.cfgLine(l, !peDist, beg, nei + "pe-distinguisher", "");
cmds.cfgLine(l, !pathLim, beg, nei + "aspath-limit", "");
cmds.cfgLine(l, !nshChain, beg, nei + "nsh-chain", "");
cmds.cfgLine(l, !domainPath, beg, nei + "domain-path", "");
cmds.cfgLine(l, !bfdDiscr, beg, nei + "bfd-discriminator", "");
cmds.cfgLine(l, !tunEnc, beg, nei + "tunenc", "");
cmds.cfgLine(l, !lnkSta, beg, nei + "linkstate", "");
Expand Down Expand Up @@ -2805,6 +2816,10 @@ public boolean setParamCfg(cmds cmd, boolean negated) {
nshChain = !negated;
return false;
}
if (s.equals("domain-path")) {
domainPath = !negated;
return false;
}
if (s.equals("bfd-discriminator")) {
bfdDiscr = !negated;
return false;
Expand Down
35 changes: 34 additions & 1 deletion src/org/freertr/rtr/rtrBgpUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,7 @@ public static boolean isUnknownAttr(int i) {
case attrPeDistLab:
case attrPathLimit:
case attrNshChain:
case attrDomPath:
case attrBfdDisc:
case attrStdComm:
case attrOriginator:
Expand Down Expand Up @@ -2551,6 +2552,16 @@ public static void parseNshChain(tabRouteEntry<addrIP> ntry, packHolder pck) {
ntry.best.nshChain = pck.getCopy();
}

/**
* parse domain path attribute
*
* @param ntry table entry
* @param pck packet to parse
*/
public static void parseDomainPath(tabRouteEntry<addrIP> ntry, packHolder pck) {
ntry.best.domainPath = pck.getCopy();
}

/**
* parse bfd discriminator attribute
*
Expand Down Expand Up @@ -3039,6 +3050,9 @@ public static List<tabRouteEntry<addrIP>> interpretAttribute(rtrBgpSpeak spkr, t
case attrNshChain:
parseNshChain(ntry, pck);
return null;
case attrDomPath:
parseDomainPath(ntry, pck);
return null;
case attrBfdDisc:
parseBfdDiscr(ntry, pck);
return null;
Expand Down Expand Up @@ -3208,6 +3222,7 @@ public static void createReachable(rtrBgpSpeak spkr, packHolder pck, packHolder
placePrefSid(spkr, safi, pck, hlp, ntry);
placeBier(spkr, pck, hlp, ntry);
placeNshChain(spkr, pck, hlp, ntry);
placeDomainPath(spkr, pck, hlp, ntry);
placeBfdDiscr(spkr, pck, hlp, ntry);
placeAttribSet(spkr, pck, hlp, ntry);
if (safi == safiAttrib) {
Expand Down Expand Up @@ -3759,7 +3774,7 @@ public static void placeAttribSet(rtrBgpSpeak spkr, packHolder trg, packHolder h
}

/**
* place attribute set attribute
* place nsh chain attribute
*
* @param spkr where to signal
* @param trg target packet
Expand All @@ -3776,6 +3791,24 @@ public static void placeNshChain(rtrBgpSpeak spkr, packHolder trg, packHolder hl
placeAttrib(spkr, flagOptional | flagTransitive, attrNshChain, trg, hlp);
}

/**
* place domain path attribute
*
* @param spkr where to signal
* @param trg target packet
* @param hlp helper packet
* @param ntry table entry
*/
public static void placeDomainPath(rtrBgpSpeak spkr, packHolder trg, packHolder hlp, tabRouteEntry<addrIP> ntry) {
if (ntry.best.domainPath == null) {
return;
}
hlp.clear();
hlp.putCopy(ntry.best.domainPath, 0, 0, ntry.best.domainPath.length);
hlp.putSkip(ntry.best.domainPath.length);
placeAttrib(spkr, flagOptional | flagTransitive, attrDomPath, trg, hlp);
}

/**
* place attribute set attribute
*
Expand Down
37 changes: 36 additions & 1 deletion src/org/freertr/tab/tabRouteAttr.java
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,11 @@ public enum routeType {
*/
public byte[] nshChain;

/**
* domain path
*/
public byte[] domainPath;

/**
* bfd discriminator
*/
Expand Down Expand Up @@ -768,6 +773,12 @@ public void copyBytes(tabRouteAttr<T> atr, boolean fwd) {
} else {
atr.nshChain = null;
}
if (domainPath != null) {
atr.domainPath = new byte[domainPath.length];
bits.byteCopy(domainPath, 0, atr.domainPath, 0, domainPath.length);
} else {
atr.domainPath = null;
}
if (bfdDiscr != null) {
atr.bfdDiscr = new byte[bfdDiscr.length];
bits.byteCopy(bfdDiscr, 0, atr.bfdDiscr, 0, bfdDiscr.length);
Expand Down Expand Up @@ -1132,6 +1143,19 @@ public int differs(tabRouteAttr<T> other) {
} else if (other.nshChain != null) {
return 119;
}
if (domainPath != null) {
if (other.domainPath == null) {
return 124;
}
if (domainPath.length != other.domainPath.length) {
return 125;
}
if (bits.byteComp(domainPath, 0, other.domainPath, 0, domainPath.length) != 0) {
return 126;
}
} else if (other.domainPath != null) {
return 127;
}
if (bfdDiscr != null) {
if (other.bfdDiscr == null) {
return 120;
Expand Down Expand Up @@ -1539,6 +1563,7 @@ public static void ignoreHelp(userHelping hl, int lv) {
hl.add(null, lv + " " + lv + ",. pedisting ignore pe distinguisher");
hl.add(null, lv + " " + lv + ",. pathlimit ignore aspath limit");
hl.add(null, lv + " " + lv + ",. nshchain ignore nsh service chain");
hl.add(null, lv + " " + lv + ",. domainpath ignore domain path");
hl.add(null, lv + " " + lv + ",. bfddiscr ignore bfd discriminator");
hl.add(null, lv + " " + lv + ",. orignted ignore originator");
hl.add(null, lv + " " + lv + ",. pmsi ignore pmsi");
Expand Down Expand Up @@ -1654,6 +1679,9 @@ public static long string2ignore(String a) {
if (a.equals("bfddiscr")) {
return 0x100000000L;
}
if (a.equals("domainpath")) {
return 0x200000000L;
}
return 0;
}

Expand Down Expand Up @@ -1767,6 +1795,9 @@ public static String ignore2string(long i) {
if ((i & 0x100000000L) != 0) {
a += " bfddiscr";
}
if ((i & 0x200000000L) != 0) {
a += " domainpath";
}
return a.substring(1, a.length());
}

Expand Down Expand Up @@ -1920,6 +1951,9 @@ public static <T extends addrType> void ignoreAttribs(tabRouteAttr<T> ntry, long
if ((ign & 0x100000000L) != 0) {
ntry.bfdDiscr = null;
}
if ((ign & 0x200000000L) != 0) {
ntry.domainPath = null;
}
}

/**
Expand Down Expand Up @@ -1965,7 +1999,8 @@ public void fullDump(userFormat lst, String beg) {
lst.add(beg + "attribute asnam|" + clntWhois.asn2name(attribAs, true));
lst.add(beg + "attribute value|" + bits.byteDump(attribVal, 0, -1));
lst.add(beg + "nsh chain value|" + bits.byteDump(nshChain, 0, -1));
lst.add(beg + "bfd discr value|" + bits.byteDump(nshChain, 0, -1));
lst.add(beg + "domain path value|" + bits.byteDump(domainPath, 0, -1));
lst.add(beg + "bfd discr value|" + bits.byteDump(bfdDiscr, 0, -1));
lst.add(beg + "tunnel type|" + tunelTyp);
lst.add(beg + "tunnel value|" + bits.byteDump(tunelVal, 0, -1));
lst.add(beg + "link state|" + bits.byteDump(linkStat, 0, -1));
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.16-cur, done by sprscc13@mrn0b0dy.
-;-;-;2025-02-16 10:05:01, took 00:15:36, with 50 workers, on 3634 cases, 0 failed, 0 traces, 2 retries
-;-;-;2025-02-16 10:48:05, took 00:15:01, 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.16-cur, done by sprscc13@mrn0b0dy.<br/>
tested: 2025-02-16 10:05:01, took 00:15:36, with 50 workers, on 3634 cases, 0 failed, 0 traces, 2 retries<br/>
tested: 2025-02-16 10:48:05, took 00:15:01, 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.16-cur, done by sprscc13@mrn0b0dy.
-;-;-;2025-02-16 10:19:10, took 00:13:38, with 50 workers, on 700 cases, 0 failed, 0 traces, 0 retries
-;-;-;2025-02-16 11:01:59, took 00:13:24, 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.16-cur, done by sprscc13@mrn0b0dy.<br/>
tested: 2025-02-16 10:19:10, took 00:13:38, with 50 workers, on 700 cases, 0 failed, 0 traces, 0 retries<br/>
tested: 2025-02-16 11:01:59, took 00:13:24, 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 8cd0491

Please sign in to comment.