[management] fix force-push to feature/flow branch (#3500)

This commit is contained in:
hakansa
2025-03-14 01:36:46 +08:00
committed by GitHub
parent 18871b554f
commit 78b86e0beb
10 changed files with 152 additions and 112 deletions

View File

@@ -1012,6 +1012,7 @@ func (a *Account) connResourcesGenerator(ctx context.Context) (func(*PolicyRule,
}
fr := FirewallRule{
PolicyID: rule.ID,
PeerIP: peer.IP.String(),
Direction: direction,
Action: string(rule.Action),

View File

@@ -20,6 +20,9 @@ const (
// FirewallRule is a rule of the firewall.
type FirewallRule struct {
// PolicyID is the ID of the policy this rule is derived from
PolicyID string
// PeerIP of the peer
PeerIP string
@@ -58,6 +61,7 @@ func generateRouteFirewallRules(ctx context.Context, route *nbroute.Route, rule
}
baseRule := RouteFirewallRule{
PolicyID: rule.PolicyID,
SourceRanges: sourceRanges,
Action: string(rule.Action),
Destination: route.Network.String(),

View File

@@ -6,6 +6,9 @@ import (
// RouteFirewallRule a firewall rule applicable for a routed network.
type RouteFirewallRule struct {
// PolicyID is the ID of the policy this rule is derived from
PolicyID string
// SourceRanges IP ranges of the routing peers.
SourceRanges []string