test: F2 acceptance — five of FILIUS' examples run as Java FILIUS runs them

ExampleRun opens an example as FILIUS opens it (SzenarioVerwaltung.laden
into the window's lists), starts it as the action mode does, plays a
story and writes every card's frames and tables, the calls, the
addresses and the RIP tables' changes. examplesJava.test.ts reads the
same file with this package's reader and runs it in the core
(projectSnapshot, new): routing (internetwork_komplett), DHCP
(einfaches_rechnernetz_komplett), DNS (dns_server), NAT
(nat_with_mapped_port) and firewall (Internet_Komplett_..._DE) match
card by card.

Found and fixed: a host's ipForwardingEnabled, which Java saves and
obeys, was unknown to the reader, the model, the core, the writer, the
export and FlsOracle; and Java's ARP learns only from a request for its
own address or a reply. Named Java bugs: a ping without a gateway throws
a NullPointerException; a home router drops the answer of a second
remote end. Open: Java picks between equally long RIP routes by thread
timing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 15:57:10 +00:00
co-authored by Claude Opus 5.5
parent 21a404693c
commit 0abce60aef
29 changed files with 64827 additions and 36 deletions
+9 -4
View File
@@ -56,7 +56,7 @@
// remote links.
import { compareIds, type Id } from '../ids.js';
import { isPcClassEndpoint, stableGeneratedMacAddress } from '../model/node.js';
import { forwardsIPv4ByDefault, isPcClassEndpoint, stableGeneratedMacAddress } from '../model/node.js';
import type {
DeviceConfiguration,
DhcpServerConfiguration,
@@ -4087,7 +4087,12 @@ export class NetworkRuntimeEngine {
nodeId: Id,
networkInterface: NetworkInterface,
): void {
if (packet.senderIPAddress !== UNSPECIFIED_IP_ADDRESS) {
// Java's ARPThread: a packet from the network's own address is dropped; an entry comes from a
// request for the card's address or from a reply (Swift, and swiftArp: from every packet).
const network = maskAddress(parseIPv4(networkInterface.ipAddress) ?? 0, parseIPv4(networkInterface.subnetMask) ?? 0);
if (!this.swiftArp && parseIPv4(packet.senderIPAddress) === network) return;
const learns = this.swiftArp || packet.targetIPAddress === networkInterface.ipAddress || packet.operation === 'reply';
if (packet.senderIPAddress !== UNSPECIFIED_IP_ADDRESS && learns) {
getOrCreate(this.stateValue.arpCachesByNodeId, nodeId, () => new Map()).set(packet.senderIPAddress, {
ipAddress: packet.senderIPAddress,
macAddress: packet.senderMacAddress,
@@ -4495,8 +4500,8 @@ export class NetworkRuntimeEngine {
if (!this.deliverIPv4Locally(packetForProcessing, nodeId, networkInterface, finished)) finished();
return;
}
// Java: routers and home routers forward (IpForwardingEnabled), nothing else.
if (node.kind !== 'router' && node.kind !== 'gateway') {
// Java: routers and home routers forward, a host when its IP forwarding is on (ipForwardingEnabled).
if (!(this.stateValue.topologySnapshot.ipForwardingByNodeId.get(nodeId) ?? forwardsIPv4ByDefault(node.kind))) {
this.recordTrace({
frameIdentity,
packetIdentity: packetForProcessing.identity,