Packet filter control verbs: the node-engine renders allowances within the compose-ask bound and keeps the loaded filter when unanswered (ADR 0683) #246

Merged
mesh-tools merged 7 commits from feat/packet-filter-allow into main 2026-11-21 21:36:37 +00:00
7 Commits
Author SHA1 Message Date
jschoubben 3991d531bf Order the ghost's entry case and end the first shadow before its setting changes
Review round 2 (2), fix-a-bug-met-twice: the ghost's entry was answered at
once, so a pass could read it entry-missing before the assertion read
entry-asked; its answer now waits until the assertion has read. The 250 ms
real sleep before compose now is gone: askedWithin is set to none, then to
an hour for the ask made again at once. The first shadow ran on while
notReadyAfter was set for the next step, a data race; it is ended first.

Builds: design 47 H H-A-312
2026-11-21 22:32:36 +01:00
jschoubben d0129d08ae Grant the node-engine the subscription to its allowances-changed
Review round 1 (5): the node grant's stored copy had the allowed call
subjects but not the event the engine consumes, which the grants part
grants every machine's as a wildcard; the subtest of allowances-changed
now checks the grant covers the node's subject.

Builds: design 08 control-verbs §1, §3
2026-11-21 22:32:36 +01:00
jschoubben f11be5d529 Answer the node's links in the node-engine seat's converged
The holder of node-packet-filter says when an allowance opens an outward
link and reads no shape of the loaded table to know one, so converged
answers the tunnel's interface and the outward links from the one
classification the filter render uses; links it cannot read refuse it.

Builds: design 33 control-verbs §10, §14; design 08 control-verbs §2; design 47 H H-A-325
2026-11-21 22:32:36 +01:00
jschoubben f642077720 Keep an allowance with no interface off the outward links
An allowance of the default set opened every link but the tunnel, so a
node's internet-facing link took it too. It now negates the tunnel and
every outward link, the same links the derived rules count as outside;
an outward link opens only when an allowance names it.

Builds: design 08 control-verbs §2, §8; design 47 H lead answer H-A-324
2026-11-21 22:32:36 +01:00
jschoubben 546e535375 Serve the node-engine seat's converged, and name a part a compose kept
The holder of node-packet-filter asks the node's convergence state before it
allows a port, and never assumes converged: the engine answers it from its
record, adopted or converged, since the mode last changed (now recorded with
its time), and the found firewall's kind when adopted; a record with no mode is
refused. The composition read of the filter's holder names, under
withheld-parts, the part node-packet-filter.allowed with why when the last
compose kept the filter file because allowed did not answer.

Builds: design 33 control-verbs §10, §14; design 08 control-verbs §4, §8; ADR 0683, ADR 0168; H-A-316, H-A-321
2026-11-21 22:32:36 +01:00
jschoubben dc3765bb7c Ask the packet filter's holder allowed at every compose of the filter
The node-engine stays the one renderer of the filter file: at each compose of
a converged node's filter it asks the holder of node-packet-filter its verb
allowed within the setting compose-ask-bound (10 s) and renders the answer.
When allowed does not answer, or answers what is not its answer, no filter file
is composed: the one loaded is kept as it runs, the holder's module is not held
(an old holder must stay replaceable), and the part withheld is said once in
the journal until an answer comes between. The node hears allowances-changed
on its own node's subject and composes again. The manifest invokes
seat:node-packet-filter.allowed and consumes node-packet-filter.allowances-changed.

Builds: design 08 control-verbs §1, §3, §4, §5, §7, §8; ADR 0683; H-A-305, H-A-307 (1), (2), H-A-314 (3), (5), (7), H-A-315 (2), (6), H-A-321
2026-11-21 22:32:36 +01:00
jschoubben 2a29c458ce Render the packet filter's allowances beside the derived ports
The operator, 2026-11-21: a firewall module has tools to open a port by hand
beside the ports derived from the modules' listens, and the node-engine stays
the one renderer of the filter file. AsNftablesAllowing renders each allowance
the holder answered as one accept rule in the input chain after the derived
ones: its interface by name or a negated match on the private network's
interface, its source by its family, an until as the one element of a timeout
set so the kernel closes the port, and the comment allowance <key> <at>. With
no allowance the file is today's, byte for byte.

Builds: design 08 control-verbs §2, §8; ADR 0683; H-A-305, H-A-308 (1), H-A-315 (4), (5)
2026-11-21 22:32:06 +01:00