cmm put a next hop's MAC into CDX when it programmed the route and then
only watched the next hop's address and interface. A next hop that
changed its MAC (a new ISP modem, an IP reused by another LAN host) kept
receiving its flows at the old MAC, possibly another host's, and new
flows reused the stale route until cmm was restarted. Neighbors no route
used also stayed cached as resolved, so a later route to the same IP got
the old MAC without asking the kernel.
cmm_neigh_check() now re-reads the ARP and NDP tables (one dump per
family) and marks every cached neighbor whose MAC changed or is gone;
cmm_route_check_neighbors() deregisters the routes using it and their
offloaded flows, which re-offload once the next hop resolves again. It
runs every maintenance cycle (30 s) and after route-socket changes, and
cmm_route_handle_change() also treats a different MAC as a change. The
last reference to a neighbor frees it. The link-layer table parser is
shared by both lookups and bounds-checks each entry's length.
pf_notify vetoes af-to (NAT64) states: their two keys are in different
address families, which cmm cannot program.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Offload stays off by default: it is only needed for multi-gigabit
throughput on the 10 GbE ports. The README says how to turn it on and
off (in /etc/rc.conf.local; onestop, since rc.subr refuses a plain stop
once it is disabled) and lists the caveats: no TCP sequence checks for
offloaded flows, Suricata/Zenarmor/NetFlow/tcpdump see only their first
packets, VLAN and rule counters miss hardware traffic, the MAC address
gap, what is untested, and the reboot after an update. RELEASE.md keeps
the design and points there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- caam: the bus activate, deactivate and release resource methods take
no type and rid in FreeBSD 15.
- cdx: sys/cdefs.h defines __maybe_unused now; define it only if missing.
- 26.1 is end of life and no longer built: remove patches/26.1 and
make-26.1.conf, default to 26.7 and FreeBSD 15.1 throughout, and move
the build examples in README.md and RELEASE.md to 26.7.9. The 26.1
tree on the mirror stays, for gateways that still have to upgrade.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tools' distfiles step walks every port's whole dependency tree again,
one make at a time: 70 of 266 ports in 9 hours under emulation. It
also walks the default flavor's tree for flavored ports (QEMU's desktop
dependencies for qemu@guestagent) and fails there on a port the build
never needs (gstreamer1-plugins-bad, missing from its distinfo). The
ports step fetches what it builds anyway, so the step is dropped, and
with it the tools patch that only fixed it.
pkg's distfiles are seeded into the distfiles set (which tools
extracts into the ports chroot) before the first chunk. A chunk whose
log shows "Couldn't fetch it" or "Giving up on fetching files" has
those ports repaired with fetch-patch.sh and runs once more.
fetch_failures accepts only port names, tested against real and
crafted logs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Natively, the first fetch in tools' distfiles chroot builds pkg, whose
GitHub patches no longer match distinfo, and tools' fetch loop records
a failure in a path outside the chroot, which under sh -e ended the
loop with no port named. patches/tools/0001 records failures inside
the chroot (as tools' ports step does); build.sh applies patches/tools
to every series. pkg's distfiles go into the set before the step, via
fetch-patch.sh; repairs are appended to the set instead of rewriting
a set of many gigabytes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
qemu-user cannot run cargo, so no Rust port (py-cryptography and its
dependents) can be cross-built. The build VM is now FreeBSD arm64 under
full-system emulation (qemu-system-aarch64, TCG), run by the new
release/vmhost.sh in a rootless podman container on the build host
GW_VMHOST. vm.sh drives it over ssh and reaches the VM's loopback-only
ssh port through the host (ProxyJump). Settings may live in
$GW_KEYDIR/vm.conf.
The image download probes its sources, resumes stalled transfers and
falls back to a mirror that keeps old releases; the checksum always comes
from FreeBSD itself.
build.sh builds the ports in chunks of PORTS_CHUNK (20) with timings, so
progress is visible and a failure costs one chunk, then runs the whole
list once more to bundle the set. ports_list evaluates ports.conf like
tools' list_config does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- gwmirror.py: lay a build into the mirror tree, verify it (signatures,
catalogues, sizes, hashes, aarch64-only ELF, and over HTTPS also TLS
expiry, Content-Length, redirects) and publish it with rsync only when
it verifies; tests cover tampering, untrusted and revoked keys,
traversal and decompression limits
- server/: unprivileged nginx for a Portainer stack serving the SMB share
read-only, GET/HEAD only, proxying changelog/bogons from upstream
- monitor/: daily systemd user timer running verify --url
- RELEASE.md: design and runbook; README.md points to it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This is how our releases have always been built: Patch opnsense/core before building it. This is required for online updates.
Also, update the readme to use opnsense.mono.si for prefetching sets. The packages set available there includes the patched core package.
Replace custom /build/ layout with standard OPNsense /usr/ hierarchy.
Add DEPSDIR variable to GATEWAY.conf. Make git pull non-fatal for NFS
setups. Update all Makefile paths, symlinks, and README instructions.
- Pass SYSROOT and KSRCDIR from top-level Makefile to all Makefile.cross
invocations so SRCTOP override flows through to sub-makes
- Add .ORDER directives to prevent "make -j clean all" race where clean
deletes .ko files while modules target tries to copy them
- Remove redundant dist target (modules/userspace already copy to dist/)
- Fix package target depending on clean (raced with its own dist dep)
- Make IMAGESDIR/SETSDIR overridable with ?=
- Update mk-kernel-img.sh defaults from legacy /mnt/vision paths
- Replace MONO-GATEWAY with GATEWAY in all Makefile comments
- Remove stale patches/ from README directory tree
- Document SRCTOP override and make image shortcut in README
Add mc4_reset()/mc6_reset() handlers in CDX multicast command processor.
CMD_MC4_RESET and CMD_MC6_RESET were unhandled — the size check rejected
them (length 0 < MC4_MIN_COMMAND_SIZE) returning ERR_WRONG_COMMAND_SIZE.
Handle reset before the size check since it carries no payload.
Also: bump libxml2 to 2.15.2, remove sudo from make image (assumes root),
add -isystem for kernel headers in CMM cross-build, add cmmctl command
reference (CMM.md).
- Miss action fixup: Ethernet/PPPoE tables → PLCR policer (rate-limits
exception traffic), all other tables → KG scheme with CC_EN (re-enters
CC tree). Replaces previous ENQ_FRAME-to-default-FQID approach.
- Distribution FQRs now use per-CPU SW portal channels instead of pool
channel, preventing TCP reordering on miss path.
- BMan buffer refill: cdx_dist_fq_rx_callback now calls
dtsec_rm_pool_rx_refill_bpid() and frees buffers via
dtsec_rm_buf_free_external() (per-port UMA zone) instead of direct
bman_put_buffer().
- Clean kldunload: cdx_destroy_port_fqs() retires all dist FQRs,
qman_portal_quiesce() drains in-flight portal polls.
FM_PORT_DeletePCD() called on all dtsec RX + OH ports before hash
table deletion, preventing FMan PCD exceptions after unload.
Replace the single OPNsense-26.1-aarch64-GATEWAY.patch with per-subsystem
format-patches in patches/. These are generated from the opnsense-src
mono-gateway branch via git format-patch and can be applied with git am.
Also fix package build: add pcf2131.ko and caam.ko to plist, clean stale
packages before creating new ones, and update README with build instructions
and the git am workflow.