policy: include CapGrant destinations for peer relay capabilities#3192
Open
wangrzneu wants to merge 1 commit intojuanfont:mainfrom
Open
policy: include CapGrant destinations for peer relay capabilities#3192wangrzneu wants to merge 1 commit intojuanfont:mainfrom
wangrzneu wants to merge 1 commit intojuanfont:mainfrom
Conversation
a1ecae3 to
ad3aa67
Compare
Extend MatchFromFilterRule to union CapGrant[].Dsts into the rule destination set so grant-only policies produce a complete peer map. Without this, a node receiving capabilities (e.g. cap/relay, cap/relay-target) only via a CapGrant could not see the grant issuer as a peer, breaking peer relay. Regression tests: - hscontrol/policy/matcher: TestMatchFromFilterRuleIncludesCapGrantDests - hscontrol/policy/v2: TestBuildPeerMapFromAppOnlyRelayGrant - integration: TestGrantCapRelayAppOnly (app-only grant, no IP connectivity) Signed-off-by: wangrzneu <wangrzneu@gmail.com>
ad3aa67 to
f97cb52
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Extend MatchFromFilterRule in hscontrol/policy/matcher/matcher.go to union CapGrant[].Dsts into the rule's destination set. Without this, a node that only receives capabilities (e.g. cap/relay, cap/relay-target) through a CapGrant is excluded from the grant issuer's peer map, which breaks peer relay on grant-only policies.
Close: #2841
Peer Relay Test Method and Results
Method
blocked.
Result
Conclusion
Check List