GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(dataplane): preserve established replies and explicitly deny exp… · arencloud/unf@b87d050

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • bins/unf-agent/src/tests
    • service_reply.rs
  • docs
    • adr
      • 0436-reverse-service-gate-preserves-established-flow-contract.md
    • development
      • phase9-attested-encryption-fabric-plan.md
      • phase9-required-locality-plan.md
    • project-status.md
  • ebpf/unf-ebpf-tc/src
    • locality_runtime.rs
  • hack
    • verify-main-locality-bridge.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎bins/unf-agent/src/tests/service_reply.rs‎

Copy file name to clipboardExpand all lines: bins/unf-agent/src/tests/service_reply.rs
+28-3Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fn deny(source: u32, destination: u32, protocol: u8, port: u16) -> PolicyMapEntr
6868

6969
#[test]
7070
#[ignore = "requires actual main BPF execution and UNF_EBPF_OBJECT"]
71-
fn privileged_reverse_service_requires_current_forward_policy_witness() {
71+
fn privileged_reverse_service_requires_live_forward_policy_witness() {
7272
for ipv6 in [false, true] {
7373
for protocol in [6, 17] {
7474
verify(ipv6, protocol);
@@ -212,10 +212,25 @@ fn verify(ipv6: bool, protocol: u8) {
212212
.set(0, encode_policy_config(7, 2, 1, 0).unwrap(), 0)
213213
.unwrap();
214214
native_transport(&mut encryption, 2);
215+
assert_eq!(
216+
run_tc(&mut ebpf, "unf_observe_ingress", &reply).0,
217+
3,
218+
"ADR 0070 established reply was lost across policy revision churn"
219+
);
220+
let idle = unf_ebpf_common::connection_timeout_ns(protocol).unwrap();
221+
let expired_at = monotonic_time_ns()
222+
.unwrap()
223+
.checked_sub(idle + 1_000_000_000)
224+
.expect("fixture requires kernel uptime longer than the protocol timeout");
225+
for key in connections.keys().collect::<Result<Vec<_>, _>>().unwrap() {
226+
let mut value = connections.get(&key, 0).unwrap();
227+
value[..8].copy_from_slice(&expired_at.to_ne_bytes());
228+
connections.insert(key, value, 0).unwrap();
229+
}
215230
assert_eq!(
216231
run_tc(&mut ebpf, "unf_observe_ingress", &reply).0,
217232
2,
218-
"stale policy witness survived current revision"
233+
"expired policy witness retained Service reply authority"
219234
);
220235
assert_eq!(run_tc(&mut ebpf, "unf_observe_ingress", &request).0, 3);
221236
assert_eq!(
@@ -243,6 +258,16 @@ fn verify(ipv6: bool, protocol: u8) {
243258
);
244259
native_transport(&mut encryption, 2);
245260
assert_eq!(run_tc(&mut ebpf, "unf_observe_ingress", &reply).0, 3);
261+
policy_config.set(0, [0; 24], 0).unwrap();
262+
assert_eq!(
263+
run_tc(&mut ebpf, "unf_observe_ingress", &reply).0,
264+
2,
265+
"Service reply bypassed absent active policy configuration"
266+
);
267+
policy_config
268+
.set(0, encode_policy_config(7, 2, 1, 0).unwrap(), 0)
269+
.unwrap();
270+
assert_eq!(run_tc(&mut ebpf, "unf_observe_ingress", &request).0, 3);
246271
let forward_deny = deny(11, 22, protocol, backend_port);
247272
policies
248273
.insert(
@@ -264,7 +289,7 @@ fn verify(ipv6: bool, protocol: u8) {
264289
"denied forward created unsolicited reply authority"
265290
);
266291
println!(
267-
"service-reply-policy: family={} protocol={protocol} current-reply=true missing-witness-denied=true stale-witness-denied=true missing-transport-denied=true denied-forward-reply-denied=true backend-preserved=true",
292+
"service-reply-policy: family={} protocol={protocol} current-reply=true revision-churn-preserved=true missing-witness-denied=true expired-witness-denied=true absent-policy-denied=true missing-transport-denied=true denied-forward-reply-denied=true backend-preserved=true",
268293
if ipv6 { 6 } else { 4 }
269294
);
270295
}
Collapse file

‎docs/adr/0436-reverse-service-gate-preserves-established-flow-contract.md‎

Copy file name to clipboard
+47Lines changed: 47 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# ADR 0436: Reverse-Service gate preserves the established-flow contract
2+
3+
Date: 2026-09-21
4+
5+
Status: failed cl02 attempt retained; test contract corrected, rerun pending
6+
7+
The `8dc7f3d` seven-test image passes its first six tests on cl02, then fails
8+
the new reverse-Service assertion expecting a policy-revision increment alone
9+
to invalidate an established reply. The actual return was PIPE, expected SHOT.
10+
This attempt is failed, never a qualification, and was not advanced to Kind.
11+
12+
Inspection identifies a fixture/design-description error, not a demonstrated
13+
failure of the documented connection timeout: ADR 0070 deliberately preserves
14+
established TCP/UDP/SCTP witnesses across global policy-revision churn. The
15+
existing shared regression `connection_state_is_protocol_bounded_and_survives_policy_churn`
16+
asserts that exact behavior. Forcing revision equality would regress bootstrap
17+
and ordinary connection continuity on unrelated Pod/policy changes.
18+
19+
ADR 0435's phrases "at the current policy revision" and "stale witnesses" are
20+
therefore corrected: a reply requires an exact **live, protocol-time-bounded**
21+
forward witness and an active nonzero policy configuration, not equality with
22+
the witness's creation revision. The actual common policy and transport stages
23+
still execute. No production authorization or timeout is weakened to pass a
24+
test, and the connection implementation is unchanged.
25+
26+
The corrected exact test positively preserves revision-churn replies and
27+
explicitly ages actual map timestamps beyond the protocol timeout. It requires
28+
expired-witness denial, missing-witness denial, absent-policy denial, missing
29+
transport denial, denied-forward/unsolicited-reply denial, and backend/wire
30+
tuple preservation for IPv4/IPv6 TCP/UDP. Fixture uptime must exceed the timeout;
31+
the test cannot silently skip that negative. The old failing evidence stays.
32+
33+
Failed image:
34+
`quay.io/arencloud/unf-test-tools-dev@sha256:599e6d1cce11e19318a765e163f380997432c5f964895415ad81de9742719427`
35+
36+
Evidence: `.artifacts/p9-kernel-main-bridge-8dc7f3d-cl02`.
37+
Result SHA-256 `c42d6d0b264c4fba10ad1465d498169921c4b6acba7d283a3a339948ca52b449`;
38+
test log SHA-256 `6374ee1cbba8fa3dc6d937ae1706591728a06a9033271156670d3e1e3ea84921`.
39+
Exact-UID cleanup passes. Production remains `45d85d5`, Ready/zero restarts,
40+
with byte-identical journals. Current/retained regular/init logs contain no
41+
ERROR or malformed/partial observations: 488 current WARNs and 7,045 retained
42+
WARNs. Previously observed retention, peer/key retries and vanished-interface
43+
attach observations remain recorded, not cleared or reclassified as healthy.
44+
45+
Strict agent Clippy and test compilation pass locally. Rebuild the corrected
46+
source, repeat cl02 first, then identical-image Kind only after success. Actual
47+
publisher/main-hook socket composition and L3/L4/L5/Q remain open.
Collapse file

‎docs/development/phase9-attested-encryption-fabric-plan.md‎

Copy file name to clipboardExpand all lines: docs/development/phase9-attested-encryption-fabric-plan.md
+4Lines changed: 4 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ log review. Reverse-Service, selected-bank delivery and recovery remain open.
8383
ADR 0435 implements the policy-tracked reverse-Service bridge and expands the
8484
actual-main diagnostic to seven tests. Local checks pass; immutable cl02-first
8585
qualification and live selected-bank delivery/recovery remain pending.
86+
ADR 0436 retains the first expanded cl02 gate failure: its revision-equality
87+
assertion contradicted ADR 0070. Explicit expiry/absent-policy negatives replace
88+
that mistaken expectation, while preserving established-flow continuity.
89+
Corrected cl02-first qualification remains required; Kind has not advanced.
8690
ADRs 0381–0382
8791
qualify the isolated joint attachment/route observation on cl02 then Kind;
8892
ADR 0383 verifies stale-safe journal cuts locally. ADR 0384 implements the
Collapse file

‎docs/development/phase9-required-locality-plan.md‎

Copy file name to clipboardExpand all lines: docs/development/phase9-required-locality-plan.md
+4Lines changed: 4 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ ADR 0435 routes enforcing reverse-Service replies through current forward-policy
178178
witness checks and normal policy/locality/transport finalization, preserving
179179
backend ownership separately from rewritten VIP bytes. The expanded seven-test
180180
main-program diagnostic must pass cl02 before Kind; live composition is pending.
181+
ADR 0436 retains that cl02 gate's failure and corrects its revision-equality
182+
expectation to ADR 0070's existing live established-flow contract. Explicit
183+
expiry/absent-policy negatives are added. Corrected cl02 rerun is required;
184+
the failed image is not advanced to Kind and no live permission is weakened.
181185

182186
## Safety and efficiency boundary
183187

Collapse file

‎docs/project-status.md‎

Copy file name to clipboardExpand all lines: docs/project-status.md
+4Lines changed: 4 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -981,6 +981,10 @@ ADR 0435 adds current forward-policy witnesses to enforcing reverse-Service
981981
replies before normal policy/locality/transport handling. Backend ownership is
982982
preserved across VIP rewriting. Local checks pass; the expanded seven-test
983983
immutable gate must pass cl02 then Kind. Full runtime delivery remains open.
984+
ADR 0436 retains the failed cl02 reverse-Service assertion and corrects the
985+
fixture to the existing revision-churn-safe, protocol-bounded reply contract
986+
(ADR 0070), with explicit expiry and absent-policy negatives. No production
987+
permission changes or Kind advancement; corrected cl02 qualification is next.
984988
ADR 0338 closes the staging guard's init-container failure/restart gap before
985989
the matching Kind rollout; no live image changes occur in that metadata slice.
986990
Required locality/replica coverage, full lifecycle requalification and S1–S5
Collapse file

‎ebpf/unf-ebpf-tc/src/locality_runtime.rs‎

Copy file name to clipboardExpand all lines: ebpf/unf-ebpf-tc/src/locality_runtime.rs
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ pub(super) fn prepare_service_reply<const IPV6: bool>(direction: Direction, tcp_
7373
populate_connection_keys(observation, key, reverse);
7474
#[allow(unsafe_code)]
7575
let now = unsafe { bpf_ktime_get_ns() };
76+
// ADR 0070: a live established witness survives unrelated global
77+
// revision churn; protocol expiry and nonzero current policy still
78+
// apply. The common policy/transport stages remain authoritative.
7679
if !refresh_connection(reverse, active_policy_revision(), now) {
7780
return TC_ACT_SHOT;
7881
}
Collapse file

‎hack/verify-main-locality-bridge.sh‎

Copy file name to clipboardExpand all lines: hack/verify-main-locality-bridge.sh
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ for name in \
1313
privileged_egress_source_steering_is_policy_first_destination_exact_and_dual_stack \
1414
privileged_load_balancer_dsr_preserves_dual_stack_vips_and_direct_return \
1515
privileged_service_packets_translate_dual_stack_and_survive_churn \
16-
service_reply::privileged_reverse_service_requires_current_forward_policy_witness; do
16+
service_reply::privileged_reverse_service_requires_live_forward_policy_witness; do
1717
/usr/local/bin/unf-main-tests --ignored --exact "tests::$name" --nocapture --test-threads=1 | tee "$output"
1818
grep -Eq '^test result: ok\. 1 passed; 0 failed; 0 ignored;' "$output"
1919
printf 'main-locality-check: name=%s passed=true\n' "$name"

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.