diff options
| author | Calvin Morrison <calvin@pobox.com> | 2026-08-19 12:54:29 -0400 |
|---|---|---|
| committer | Calvin Morrison <calvin@pobox.com> | 2026-08-19 12:54:29 -0400 |
| commit | 841d1b31f575aef87a65e425fdc87b004c53cf0a (patch) | |
| tree | fdaa03ec138d980341b5b51d28baa17a05d140af /gui/cmd | |
| parent | d1fc2a8047d722f90d289fafe41be0029c6e39ff (diff) | |
test: put fw on a wire, with another machine on the other end
Everything in fwtest.rc happens on one machine, which is as far as it
goes: it can take a spare card and watch what fw does to the
interfaces, but it cannot make a neighbour send anything. Four things
were listed as never tested for that reason. Three of them now are.
run.sh -gw and -lan join two VMs into a point-to-point segment, so the
peer is a plain overlay of the base with an address and nothing else.
ARP first, since it is the part with no other explanation: the stack
that owns 10.9.9.1 has a pkt interface and no ethernet, so nothing else
on that segment can answer for it. The peer's arp table:
ether OK 10.9.9.1 52540087c8c1 10.9.9.2
which is the firewall's card. The first ping takes about a second and
the rest are sub-millisecond -- fw ARPing for the peer before it can
reply, and dropping the first one while it asks, which is the drop no
rule caused in fw(8) BUGS, until now only reasoned about.
Then filtering as against forwarding, which cannot be seen from inside
at all. With allow=in proto=icmp alone, a TCP connect from the peer
sits for 290 seconds and times out; prepend a rule through ctl and the
same connect is refused in 2. Refused is the far stack's RST, so the
packet arrived; timed out is fw dropping it in silence.
And frames addressed to somebody else, which is the commit that shipped
saying it could not be tested without a second machine. A stack only
addresses frames to the mac it resolved, so rawether.c forges one. A
promiscuous reader on the firewall machine sees both frames, which had
to be confirmed first -- a frame that never arrived looks exactly like
one that was filtered, and my first attempt at this drew the wrong
conclusion from precisely that. Same rig, same frames, same rules:
to fw's card to nobody's
no check +3 +3
with the check +2 0
test/wire.md is the procedure, including the two ways I wasted time:
fw's control files need -s to be reachable from another shell, and
anything that leaves fw holding a pipe waits forever for a program that
has already detached.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'gui/cmd')
0 files changed, 0 insertions, 0 deletions
