diff --git a/pkg/vpcmodel/explainabilityConnectivity.go b/pkg/vpcmodel/explainabilityConnectivity.go index ac4d1e137..f71879aa9 100644 --- a/pkg/vpcmodel/explainabilityConnectivity.go +++ b/pkg/vpcmodel/explainabilityConnectivity.go @@ -185,7 +185,7 @@ func (details *rulesAndConnDetails) computeRoutersAndFilters(c *VPCConfig) (err src := singleSrcDstDetails.src dst := singleSrcDstDetails.dst singleSrcDstDetails.loadBalancerRule = getLoadBalancerRule(c, src, dst) - singleSrcDstDetails.privateSubnetRule = getPrivateSubnetRule(c, src, dst) + singleSrcDstDetails.privateSubnetRule = getPrivateSubnetRule(src, dst) if src.IsInternal() && dst.IsInternal() { // internal (including cross vpcs) singleSrcDstDetails.crossVpcRouter, _, err = getRoutingResource(c, src, dst) if err != nil { diff --git a/pkg/vpcmodel/nodesConnectivity.go b/pkg/vpcmodel/nodesConnectivity.go index 3fcda48f5..49b2eb8a6 100644 --- a/pkg/vpcmodel/nodesConnectivity.go +++ b/pkg/vpcmodel/nodesConnectivity.go @@ -78,7 +78,7 @@ func getLoadBalancerRule(c *VPCConfig, src, dst Node) LoadBalancerRule { return nil } -func getPrivateSubnetRule(c *VPCConfig, src, dst Node) PrivateSubnetRule { +func getPrivateSubnetRule(src, dst Node) PrivateSubnetRule { switch { case dst.IsInternal(): return dst.(InternalNodeIntf).Subnet().GetPrivateSubnetRule(src, dst) @@ -94,7 +94,7 @@ func getNonFilterNonRouterRulesConn(c *VPCConfig, src, dst Node, isIngress bool) if loadBalancerRule != nil && loadBalancerRule.Deny(isIngress) { return NoConns() } - privateSubnetRule := getPrivateSubnetRule(c, src, dst) + privateSubnetRule := getPrivateSubnetRule(src, dst) if privateSubnetRule != nil && privateSubnetRule.Deny(isIngress) { return NoConns() } diff --git a/pkg/vpcmodel/semanticDiff.go b/pkg/vpcmodel/semanticDiff.go index 28c2f3208..51e07d9b8 100644 --- a/pkg/vpcmodel/semanticDiff.go +++ b/pkg/vpcmodel/semanticDiff.go @@ -135,7 +135,7 @@ func getAllowedResponsiveConnections(c *VPCConfig, // for a given VPCResourceIntf (representing a subnet or an external ip) in config return the VPCResourceIntf representing the // subnet/external address in otherConfig or nil if the subnet does not exist in the other config. -func getVPCResourceInfInOtherConfig(c *VPCConfig, other *VPCConfig, ep VPCResourceIntf, +func getVPCResourceInfInOtherConfig(other *VPCConfig, ep VPCResourceIntf, diffAnalysis diffAnalysisType) (res VPCResourceIntf, err error) { if ep.IsExternal() { if node, ok := ep.(*ExternalNetwork); ok { @@ -183,11 +183,11 @@ func (confConnectivity *configConnectivity) connMissingOrChanged(other *configCo if _, ok := connectivityMissingOrChanged[src]; !ok { connectivityMissingOrChanged[src] = map[VPCResourceIntf]*connectionDiff{} } - srcInOther, err1 := getVPCResourceInfInOtherConfig(confConnectivity.config, other.config, src, diffAnalysis) + srcInOther, err1 := getVPCResourceInfInOtherConfig(other.config, src, diffAnalysis) if err1 != nil { return nil, err1 } - dstInOther, err2 := getVPCResourceInfInOtherConfig(confConnectivity.config, other.config, dst, diffAnalysis) + dstInOther, err2 := getVPCResourceInfInOtherConfig(other.config, dst, diffAnalysis) if err2 != nil { return nil, err2 }