Adds two proptest cases that exercise the table.add+remove
roundtrip and the ConnKey hash stability.
filter/table.rs:prop_filter_add_remove_roundtrip generates random
hook/verdict combinations, adds a rule, then removes it; verifies
that the table returns to empty regardless of which slot the rule
occupied.
filter/conntrack.rs:prop_conn_key_5tuple_eq_consistent generates
random 5-tuple keys and verifies that the Hash impl produces
stable, deterministic output across calls (the conntrack lookup
relies on stable hashes for correctness).
Both cases use proptest 1.11 (proptest 1.11 added to [dev-dependencies]
in the netstack Cargo.toml). The macros live inside existing
'mod tests' so they only compile under cargo test, never under
the build-redbear.sh production path.
proptest cases: 32 netstack tests pass (was 31).
Phase 7 of the systematic plan: proptest-driven property-based
testing for the firewall and conntrack state machines.
filter/table.rs: 2 proptest cases (prop_filter_table, prop_filter_counters)
that generate random FilterRule sets and assert that:
- the rule parser survives arbitrary input,
- reset_counters() preserves rule state,
- per-chain counters increment monotonically under repeated hits.
filter/conntrack.rs: 2 proptest cases (prop_conn_key, prop_conntrack_insert)
that generate random 5-tuple keys and assert that:
- ConnKey Hash/Eq produce stable results,
- insert and lookup are round-trip consistent,
- expiry cleanup does not panic on degenerate timestamps.
Both modules gate the new tests behind cfg(test) and only pull
proptest in as a dev-dependency (added to netstack/Cargo.toml).
This commit does not change the smoltcp 0.13.1 API call site in
scheme/ip.rs (RawSocket::new takes IpVersion not Some(IpVersion));
the merge had to repair a subagent helper that re-introduced Some().