Skip to content

feat(iface): support targeted neighbor invalidation - #24

Merged
fslongjin merged 1 commit into
dragonos/v0.12.0from
codex/issue-2233-neighbor-invalidate
Sep 4, 2026
Merged

feat(iface): support targeted neighbor invalidation#24
fslongjin merged 1 commit into
dragonos/v0.12.0from
codex/issue-2233-neighbor-invalidate

Conversation

@fslongjin

Copy link
Copy Markdown
Member

Summary

  • expose targeted invalidation for one dynamically learned neighbor
  • clear the matching discovery rate-limit state at the same time
  • preserve unrelated cache entries

Motivation

DragonOS rtnetlink configured neighbors temporarily override dynamic resolution. When a configured entry is deleted, the previous dynamic mapping must not silently become active again; the next packet must perform fresh discovery. A per-key API avoids flushing the full cache.

Validation

  • cargo fmt --all -- --check
  • cargo test --features medium-ethernet,proto-ipv4,proto-ipv6 --lib iface::neighbor::test::test_remove_one_mapping_and_rate_limit

Expose an interface-level operation that removes one dynamically learned neighbor mapping together with its discovery rate-limit state. This lets external control planes retire stale dynamic state without flushing unrelated entries.

Add focused cache coverage proving that invalidation clears only the selected key and permits immediate rediscovery.

Signed-off-by: longjin <longjin@dragonos.org>
@fslongjin

Copy link
Copy Markdown
Member Author

The failing matrix jobs are unrelated to this two-file change: they fail in pre-existing src/iface/interface/tests/ipv4.rs (IpPayload::Raw under reduced feature sets), an existing clippy type-complexity diagnostic, and an existing 16-bit alloc::sync configuration. The targeted neighbor-cache test and formatting pass locally, and the PR only adds the targeted cache/interface invalidation API.

@fslongjin
fslongjin merged commit 1f1172a into dragonos/v0.12.0 Sep 4, 2026
7 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant