Changelog what changed, release by release.

All notable changes are listed here. The project follows semantic versioning; the language version (version 1 in rule files) is separate from the tool version.

  1. v0.4.3 latest 23 October 2026 3 changes
    • The first release built in public: it carries a build provenance attestation, and SECURITY.md explains how to verify a download with gh attestation verify or cosign.
    • moat now needs Go 1.26 to build from source (golang.org/x/sys 0.49); Go 1.25 no longer gets fixes.
    • The spec lists known issues; the first is the Linux 6.17 verifier bug that refuses some programs --backend c builds.
  2. v0.4.2 20 October 2026 9 changes
    • moat load --shared runs moat alongside other XDP programs on the same interface, as one program of a libxdp multiprog dispatcher: the way xdp-loader shares the hook, and interoperating with it in both directions (tested against libxdp from Ubuntu, 1.5.0 and 1.6.3). --priority and --chain set where moat runs and when the next program does; --dispatcher-version picks the dispatcher moat creates when the hook is free, and a dispatcher already there keeps its version and mode. reload keeps the run config, unload takes out only moat, enable records it for boot, and status lists the dispatcher's programs in run order. moat doctor recognises a dispatcher and points to --shared; a plain load on such an interface says to add it.
    • status --json gains attach (link or dispatcher) and dispatcher; the manifest records attach, shared, program_id and boot_id. metrics exports moat_attached and moat_problem.
    • std.fragments drops TCP fragments whose header moat cannot read, which rules on TCP fields never see.
    • Limits count IPv6 sources by their /64 always, also with per ip.src/N, so a host cannot start fresh buckets from addresses of its own /64. A burst too long to measure is an error; a bit burst no larger than one frame warns.
    • Flows: a SYN on the ports of a closing flow starts a new connection, inbound packets alone no longer keep a closing flow alive, and a time read before another CPU stamped a flow no longer expires it.
    • Reliability: after the new program attaches, moat repins what the CLI needs and writes the manifest first, and reports any later failure while saying that the new rules run. A failed reload puts back the egress program it replaced. Counters kept across a reload include what the new program counted meanwhile. Writers can no longer be starved by readers of the same interface, busy set walks are retried, and a race with another tool changing the dispatcher starts the load over.
    • The boot unit retries a failed load every 3 seconds, except for errors in the rules, and starts at most 10 times a minute. enable keeps the mode, refuses an interface with a dispatcher unless --shared, and takes the running rules' priority and chain unless given.
    • Security: enable refuses a moat binary a user other than root could replace, installs the rules it checked, and keeps copies no more readable than the originals; trace -w writes its capture as 0600; set file messages no longer quote the file's lines; the importers and the language server are hardened against hostile input; the install script checks downloads against the release checksums. Releases are built with the latest Go 1.26 patch (Go 1.25 no longer gets fixes), and SECURITY.md lists the environment variables moat trusts.
    • Smaller: not being root exits 2 and a verifier rejection exits 3, version takes no arguments, --json is refused where nothing is printed, set sync ignores duplicate entries, and the help lists every flag. On Linux 6.17, use the default backend: that kernel's verifier rejects some programs clang builds.
  3. v0.4.1 20 October 2026 1 change
    • moat load and reload no longer crash on rules with address or prefix literals, which 0.4.0 did while recording the rules for keeping their counters across reloads.
  4. v0.4.0 20 October 2026 9 changes
    • Flows: connection state for rules. flow.new, flow.established and flow.src_count let rules let the replies to the host's own connections in, drop TCP packets that belong to no connection, and cap the TCP connections of one source. A second program on the interface's egress learns the connections the protected side opens or answers. They are confirmed once the other side answers, so a flood that never answers back cannot push real connections out of the table. flows ttl D size N sizes it, reload keeps it, and when it starts learning it adopts the connections that were already open for a minute. Needs Linux 6.6 (TCX); moat doctor says whether the kernel has it. status and metrics show the table. Case files describe what the host sends with dir = "out", and an echo's identifier with icmp_id.
    • Rates over other periods: limit 5/m, 30/h, 2/d or 10/90s, for slow attacks such as SSH password guessing. moat import keeps the period of hashlimit and nft limits instead of skipping the ones that are not a whole number per second.
    • reload keeps the counters of the rules it leaves unchanged (same name, same condition and actions, constants included) and of the default while its verdict stays. Changed and new rules start at zero. The first reload after upgrading still starts every counter afresh.
    • Keyed sets: set lists prefixes keyed holds one list per key in the same maps as a plain set, tested as ip.src in lists[345] or geo[ES, PT], and filled by rules with add ip.src to bans[12]. Keys are numbers or country codes. A file with many lists no longer runs out of the 64 maps a program can use. Set files hold KEY ENTRY lines, and moat set sync SET FILE --key K replaces one list without touching the others; set add, del, show and flush take --key too.
    • moat set sync refuses to fill an addresses set beyond its size, where it used to let the set forget some of the entries.
    • tcp.mss exists and tcp.mss missing (and the same for vlan.id) test whether a packet carries an optional field, so a rule can drop SYNs without an MSS option on purpose. The warning about not around such a field now points to missing.
    • payload contains looks for texts of up to 128 bytes (was 32), and a file can hold 24 different searches (was 16). Measured on Linux 6.8: a 512-byte window costs the verifier about 22000 instructions whatever the text's length.
    • status --json and stats --json use lowercase keys (name, packets, set_sizes...) and these stay stable from now on. Scripts that read the old capitalised keys need the new names. status also gives the sha256 of each set's live entries (set_sha256) and of the rules file a boot loads (boot_sha256), so a control plane can check that a node holds what it pushed.
    • moat now needs Go 1.25 to build from source. It moves to cilium/ebpf v0.22, which fixes an integer overflow when reading a malformed object file. moat only reads objects it has just built itself, so it was not exposed.
  5. v0.3.0 17 October 2026 7 changes
    • One-line install on Linux: curl -fsSL https://moatfw.dev/install.sh | sudo sh. It uses the apt repository on Debian and Ubuntu, the release's .rpm with dnf or yum, and otherwise puts the binary in /usr/local/bin.
    • Debian and Ubuntu packages are published to an apt repository: apt install moatfw after adding apt.moatfw.dev (see the install instructions). Every release lands there.
    • Packages name moat maintainers [email protected] as their maintainer.
    • moat status notices when the pinned counters, events or variables map was removed by hand, and names the missing map, as it already did for sets and the configuration.
    • vlan.id matches with rx VLAN offload on, when the kernel is 6.8 or newer, the program runs in native mode and the driver reports the tags it strips (veth, mlx5, ice): moat load then asks the driver for the tag and loads the program bound to the interface. In the other cases load still warns, and moat doctor --iface says which case applies.
    • moat now needs Go 1.24 to build from source (cilium/ebpf v0.21).
    • stats, status, var list and the set listings wait while a load, reload or set change is running on the interface, so they never show one program's rule names with another program's counters.
  6. v0.2.0 16 October 2026 25 changes
    • moat import iptables also reads the PREROUTING chains of the raw and mangle tables, where anti-DDoS rulesets usually live, in the order the kernel runs them. -m string becomes payload contains, and chains it does not read are listed.
    • moat import iptables --ipsets FILE reads ipset save output and writes the ipsets the rules use as set files, loaded with the rules.
    • moat import nftables translates the JSON of nft -j list ruleset: the filter base chains on the ingress, prerouting and input hooks, named sets, meters, limits and raw payload matches.
    • moat test --model runs case files and captures in a model of the program written in Go: no kernel, no root, any system. Off Linux, moat test uses it on its own. The differential tests check it against the kernel packet by packet.
    • moat doctor --iface says whether the interface already runs an XDP program, and whether moat attached it. moat load explains a program another tool attached instead of failing with "device or resource busy". In a namespace entered with nsenter, doctor finds the namespace's interfaces.
    • moat explain says, rule by rule, why each case's packet got its verdict: the test that failed and what the packet had instead.
    • moat fmt --check lists the files that are not in canonical form and exits with 1, for CI.
    • Fixed: moat load after the interface was removed and came back (what the unit moat enable installs does) failed with "already loaded"; it now attaches afresh and keeps the sets, as reload does too.
    • Fixed: a failure after the program was attached (writing the manifest) removed the pins of the maps the running program uses.
    • Fixed: a reload that failed could leave the running program with the new file's set contents; shared maps now change only once the new program runs.
    • Fixed: a variable kept across a reload could hold a value the new rules cannot use; it goes back to the file's value, with a note.
    • Fixed: set sync into a set too small to hold the old and new entries at once failed; it now removes the leaving entries first in that case.
    • Fixed: set add without --ttl could shorten a permanent entry to the set's ttl; like a rule's add, it never shortens an entry now.
    • Fixed: moat trace running across a reload waited forever; it ends and says why. stats --watch follows moat audit changes.
    • Fixed in moat import: a non-terminating iptables target such as SET or MARK counted as an accept, so a final DROP after it was left out; ! --icmp-type any lost its negation; -p udp alone (and ! -p tcp) now becomes ip.proto, which holds for fragments as iptables does; an ipset with a netmask now writes networks; an nft match after a limit or set statement stays a comment; input the importers refuse exits with 2.
    • Fixed: ::ffff:0:0/96 in a set file became 0.0.0.0/0 and matched every IPv4 packet; the whole IPv4-mapped range now stays IPv6, as it does in a rule.
    • Fixed: a limit with a variable rate accepted a burst of 0 or one so large that the burst in nanoseconds overflowed, and dropped every packet; both are refused now, and so is a packet rate above 1e9/s next to a variable burst.
    • Fixed: on IPv6, ip.len wrapped to a small number for the largest payload lengths; it is now held at 65535.
    • Fixed: moat test --pcap ignored the case file's [vars] and audit, and its [[case]] entries; it applies the first two now and refuses the cases. In case files, a 0 written for a port, TTL or window is 0.
    • moat load warns, and moat doctor --iface notes, when the interface strips VLAN tags before XDP (rx VLAN offload), which makes vlan.id rules never match.
    • Fixed: moat import nftables left meter NAME { ip saddr limit rate over R } as a comment, the form nft 1.0.9 prints; it becomes a limit per source.
    • Fixed: the C backend could pass garbage arguments to a block of rules that clang proved can never match, and the kernel refused the program.
    • moat lsp completes: declaration keywords, std modules, fields, protocols, sets, constants, variables, TCP flags and actions, each where it can go.
    • moat lsp offers quick fixes: a misspelled field or name becomes the one moat check suggests, and a prefix with host bits set its network.
    • moat lsp finds the references to a set, constant, variable or rule, and renames one everywhere in the file.
  7. v0.1.0 15 October 2026 13 changes

    First public version.

    • The moat language: protocol tests, header fields for Ethernet, VLAN, IPv4, IPv6, TCP, UDP and ICMP, payload slices, constants, lists and ranges, prefix and address sets, pass, drop, limit and add.
    • moat check with static warnings (unused names, conditions that are never true, rules that never match, misleading not, small bursts) and moat fmt.
    • moat build compiles to a BPF object with no compiler involved: moat generates the instructions and writes the object file itself. --backend c compiles through C and clang instead, and --emit-c writes the C for reading. Random packets through both builds of random rule files must agree on every verdict.
    • moat test runs the program in the kernel against case files with simulated time, or against pcap and pcapng captures.
    • moat load, reload, unload, status, audit, set, stats, enable and disable attach rules to an interface and manage them.
    • Runtime variables (var, moat var set) change rates and switch rules on and off without reloading.
    • Standard modules: use std.bogons, std.private_sources, std.amplification, std.tcp_sanity.
    • moat trace shows or captures the packets a rule decides, and moat bench times the rules per packet.
    • moat metrics prints or serves counters, sets and variables in the Prometheus format.
    • moat import iptables translates the INPUT chain of iptables-save output and keeps what it cannot translate as comments.
    • moat lsp, a VS Code extension and a tree-sitter grammar.
    • payload contains "text" (and not contains) finds text or bytes anywhere in a window of the payload.
    • moat doctor checks that a machine can run moat, and releases include Debian and RPM packages named moatfw.