Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
olasaadi99 committed Oct 7, 2024
1 parent 4c5cfe4 commit 27d92bb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/vpcmodel/explainabilityConnectivity.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/vpcmodel/nodesConnectivity.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/vpcmodel/semanticDiff.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 27d92bb

Please sign in to comment.