Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid using nil in NameForAnalyzerOut method where possible #931

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Interpreted destination(s): test-vpc2-ky/vsi21a-ky[10.240.64.4]
Connections from test-vpc1-ky/vsi11-ky[10.240.11.4] to test-vpc2-ky/vsi21a-ky[10.240.64.4]: All Connections

Path:
vsi11-ky[10.240.11.4] -> security group sg11-ky -> network ACL acl11-ky -> subnet subnet11-ky ->
test-vpc1-ky/vsi11-ky[10.240.11.4] -> security group sg11-ky -> network ACL acl11-ky -> subnet subnet11-ky ->
test-vpc1-ky -> TGW local-tg-ky -> test-vpc2-ky ->
subnet subnet21-ky -> network ACL acl21-ky -> security group sg21-ky -> vsi21a-ky[10.240.64.4]
subnet subnet21-ky -> network ACL acl21-ky -> security group sg21-ky -> test-vpc2-ky/vsi21a-ky[10.240.64.4]

------------------------------------------------------------------------------------------------------------------------

Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Interpreted destination(s): test-vpc1-ky/ky-vsi0-subnet11[10.240.80.4]
Connections from test-vpc0-ky/ky-vsi0-subnet5[10.240.9.4] to test-vpc1-ky/ky-vsi0-subnet11[10.240.80.4]: All Connections

Path:
ky-vsi0-subnet5[10.240.9.4] -> security group sg1-ky -> network ACL acl3-ky -> subnet subnet5 ->
test-vpc0-ky/ky-vsi0-subnet5[10.240.9.4] -> security group sg1-ky -> network ACL acl3-ky -> subnet subnet5 ->
test-vpc0-ky -> TGW local-tg-ky -> test-vpc1-ky ->
subnet subnet11 -> network ACL acl11-ky -> security group sg11-ky -> ky-vsi0-subnet11[10.240.80.4]
subnet subnet11 -> network ACL acl11-ky -> security group sg11-ky -> test-vpc1-ky/ky-vsi0-subnet11[10.240.80.4]

------------------------------------------------------------------------------------------------------------------------

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cross-vpc-connection: transit-connection tg_connection0 of transit-gateway local
Ingress: network ACL acl1-ky allows connection; security group sg1-ky allows connection

Path:
ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky -> | TGW local-tg-ky |

------------------------------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cross-vpc-connection: transit-connection tg_connection0 of transit-gateway local
Ingress: network ACL acl1-ky allows connection; security group sg1-ky allows connection

Path:
ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky -> | TGW local-tg-ky |


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Connections from test-vpc0-ky/ky-vsi0-subnet0[10.240.0.5] to test-vpc1-ky/ky-vsi
TCP response is blocked

Path:
ky-vsi0-subnet0[10.240.0.5] -> security group sg1-ky -> network ACL acl1-ky -> subnet subnet0 ->
test-vpc0-ky/ky-vsi0-subnet0[10.240.0.5] -> security group sg1-ky -> network ACL acl1-ky -> subnet subnet0 ->
test-vpc0-ky -> TGW local-tg-ky -> test-vpc1-ky ->
subnet subnet10 -> network ACL acl11-ky -> security group sg11-ky -> ky-vsi0-subnet10[10.240.64.4]
subnet subnet10 -> network ACL acl11-ky -> security group sg11-ky -> test-vpc1-ky/ky-vsi0-subnet10[10.240.64.4]


Details:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Interpreted destination(s): test-vpc1-ky/ky-vsi0-subnet11[10.240.80.4]
Connections from test-vpc0-ky/ky-vsi0-subnet5[10.240.9.4] to test-vpc1-ky/ky-vsi0-subnet11[10.240.80.4]: All Connections

Path:
ky-vsi0-subnet5[10.240.9.4] -> security group sg1-ky -> network ACL acl3-ky -> subnet subnet5 ->
test-vpc0-ky/ky-vsi0-subnet5[10.240.9.4] -> security group sg1-ky -> network ACL acl3-ky -> subnet subnet5 ->
test-vpc0-ky -> TGW local-tg-ky -> test-vpc1-ky ->
subnet subnet11 -> network ACL acl11-ky -> security group sg11-ky -> ky-vsi0-subnet11[10.240.80.4]
subnet subnet11 -> network ACL acl11-ky -> security group sg11-ky -> test-vpc1-ky/ky-vsi0-subnet11[10.240.80.4]


Details:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Interpreted destination(s): test-vpc0-ky/ky-vsi0-subnet2[10.240.4.4]
Connections from test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] to test-vpc0-ky/ky-vsi0-subnet2[10.240.4.4]: All Connections

Path:
ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky -> TGW local-tg-ky -> test-vpc0-ky ->
subnet subnet2 -> network ACL acl2-ky -> security group sg1-ky -> ky-vsi0-subnet2[10.240.4.4]
subnet subnet2 -> network ACL acl2-ky -> security group sg1-ky -> test-vpc0-ky/ky-vsi0-subnet2[10.240.4.4]


Details:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Interpreted destination(s): test-vpc0-ky/ky-vsi1-subnet2[10.240.4.5], test-vpc0-
Connections from test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] to test-vpc0-ky/ky-vsi0-subnet2[10.240.4.4]: All Connections

Path:
ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky -> TGW local-tg-ky -> test-vpc0-ky ->
subnet subnet2 -> network ACL acl2-ky -> security group sg1-ky -> ky-vsi0-subnet2[10.240.4.4]
subnet subnet2 -> network ACL acl2-ky -> security group sg1-ky -> test-vpc0-ky/ky-vsi0-subnet2[10.240.4.4]


Details:
Expand Down Expand Up @@ -46,9 +46,9 @@ TCP response is enabled; The relevant rules are:
Connections from test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] to test-vpc0-ky/ky-vsi0-subnet3[10.240.5.5]: All Connections

Path:
ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky -> TGW local-tg-ky -> test-vpc0-ky ->
subnet subnet3 -> network ACL acl2-ky -> security group sg1-ky -> ky-vsi0-subnet3[10.240.5.5]
subnet subnet3 -> network ACL acl2-ky -> security group sg1-ky -> test-vpc0-ky/ky-vsi0-subnet3[10.240.5.5]


Details:
Expand Down Expand Up @@ -86,9 +86,9 @@ TCP response is enabled; The relevant rules are:
Connections from test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] to test-vpc0-ky/ky-vsi1-subnet2[10.240.4.5]: All Connections

Path:
ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky -> TGW local-tg-ky -> test-vpc0-ky ->
subnet subnet2 -> network ACL acl2-ky -> security group sg1-ky -> ky-vsi1-subnet2[10.240.4.5]
subnet subnet2 -> network ACL acl2-ky -> security group sg1-ky -> test-vpc0-ky/ky-vsi1-subnet2[10.240.4.5]


Details:
Expand Down Expand Up @@ -126,9 +126,9 @@ TCP response is enabled; The relevant rules are:
Connections from test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] to test-vpc0-ky/ky-vsi1-subnet3[10.240.5.4]: All Connections

Path:
ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky -> TGW local-tg-ky -> test-vpc0-ky ->
subnet subnet3 -> network ACL acl2-ky -> security group sg1-ky -> ky-vsi1-subnet3[10.240.5.4]
subnet subnet3 -> network ACL acl2-ky -> security group sg1-ky -> test-vpc0-ky/ky-vsi1-subnet3[10.240.5.4]


Details:
Expand Down Expand Up @@ -171,7 +171,7 @@ cross-vpc-connection: transit-connection tg_connection0 of transit-gateway local
Ingress: network ACL acl1-ky allows connection; security group sg1-ky allows connection

Path:
ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky -> | TGW local-tg-ky |


Expand Down Expand Up @@ -203,7 +203,7 @@ cross-vpc-connection: transit-connection tg_connection0 of transit-gateway local
Ingress: network ACL acl1-ky allows connection; security group sg1-ky allows connection

Path:
ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky -> | TGW local-tg-ky |


Expand Down Expand Up @@ -235,7 +235,7 @@ cross-vpc-connection: transit-connection tg_connection0 of transit-gateway local
Ingress: network ACL acl1-ky allows connection; security group sg1-ky allows connection

Path:
ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky -> | TGW local-tg-ky |


Expand Down Expand Up @@ -267,7 +267,7 @@ cross-vpc-connection: transit-connection tg_connection0 of transit-gateway local
Ingress: network ACL acl1-ky allows connection; security group sg1-ky allows connection

Path:
ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky/ky-vsi1-subnet20[10.240.128.5] -> security group sg21-ky -> network ACL acl21-ky -> subnet subnet20 ->
test-vpc2-ky -> | TGW local-tg-ky |


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cross-vpc-connection: transit-connection tg_connection3 of transit-gateway local
Ingress: network ACL acl31-ky allows connection; security group sg31-ky allows connection

Path:
vsi11-ky[10.240.11.4] -> security group sg11-ky -> | network ACL acl11-ky |
test-vpc1-ky/vsi11-ky[10.240.11.4] -> security group sg11-ky -> | network ACL acl11-ky |

------------------------------------------------------------------------------------------------------------------------

14 changes: 7 additions & 7 deletions pkg/vpcmodel/explainabilityPrint.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (g *groupedConnLine) explainabilityLineStr(c *VPCConfig, connQuery *netset.

// path in "3" above
missingExternalRouter := isExternal && externalRouter == nil
path := "Path:\n" + pathStr(allRulesDetails, filtersRelevant, src, dst, ingressBlocking, egressBlocking,
path := "Path:\n" + pathStr(c, allRulesDetails, filtersRelevant, src, dst, ingressBlocking, egressBlocking,
loadBalancerBlocking, missingExternalRouter, externalRouter, crossVpcRouter,
crossVpcConnection, rules, privateSubnetRule) + newLine
// details is "4" above
Expand Down Expand Up @@ -440,12 +440,12 @@ func stringFilterEffect(allRulesDetails *rulesDetails, filterLayerName string, t
// if the connection does not exist. In the latter case the path is until the first block with the first block between ||
// e.g.: "vsi1-ky[10.240.10.4] -> SG sg1-ky -> subnet ... -> ACL acl1-ky -> PublicGateway: public-gw-ky -> Public Internet 161.26.0.0/16"
// e.g.: "vsi1-ky[10.240.10.4] -> security group sg1-ky -> subnet1-ky -> | network ACL acl1-ky |"
func pathStr(allRulesDetails *rulesDetails, filtersRelevant map[string]bool, src, dst EndpointElem,
func pathStr(c *VPCConfig, allRulesDetails *rulesDetails, filtersRelevant map[string]bool, src, dst EndpointElem,
ingressBlocking, egressBlocking, loadBalancerBlocking, missingExternalRouter bool,
externalRouter, crossVpcRouter RoutingResource, crossVpcConnection *netset.TransportSet,
rules *rulesConnection, privateSubnetRule PrivateSubnetRule) string {
var pathSlice []string
pathSlice = append(pathSlice, "\t"+src.NameForAnalyzerOut(nil))
pathSlice = append(pathSlice, "\t"+src.NameForAnalyzerOut(c))
if loadBalancerBlocking {
// todo: add loadBalancer as part of the path and also as blocking??? separate PR?
// connection is stopped at the src itself:
Expand All @@ -463,15 +463,15 @@ func pathStr(allRulesDetails *rulesDetails, filtersRelevant map[string]bool, src
return blockedPathStr(pathSlice)
}
if isExternal {
externalRouterStr := newLineTab + externalRouter.Kind() + space + externalRouter.NameForAnalyzerOut(nil)
externalRouterStr := newLineTab + externalRouter.Kind() + space + externalRouter.NameForAnalyzerOut(c)
// externalRouter is fip - add its cidr
if externalRouter.Kind() == fipRouter {
externalRouterStr += space + externalRouter.ExternalIP()
}
pathSlice = append(pathSlice, externalRouterStr)
} else if crossVpcRouterInPath { // src and dst are internal and there is a cross vpc Router
pathSlice = append(pathSlice, newLineTab+src.(InternalNodeIntf).Subnet().VPC().Name(),
crossVpcRouter.Kind()+space+crossVpcRouter.NameForAnalyzerOut(nil))
crossVpcRouter.Kind()+space+crossVpcRouter.NameForAnalyzerOut(c))
if crossVpcConnection.IsEmpty() { // cross vpc (tgw) denys connection
pathSlice[len(pathSlice)-1] = blockedLeft + pathSlice[len(pathSlice)-1] // blocking cross-vpc router
return blockedPathStr(pathSlice)
Expand All @@ -485,9 +485,9 @@ func pathStr(allRulesDetails *rulesDetails, filtersRelevant map[string]bool, src
}
// got here: full path
if len(ingressPath) == 0 {
pathSlice = append(pathSlice, newLineTab+dst.NameForAnalyzerOut(nil))
pathSlice = append(pathSlice, newLineTab+dst.NameForAnalyzerOut(c))
} else {
pathSlice = append(pathSlice, dst.NameForAnalyzerOut(nil))
pathSlice = append(pathSlice, dst.NameForAnalyzerOut(c))
}
return strings.Join(pathSlice, arrow)
}
Expand Down
14 changes: 7 additions & 7 deletions pkg/vpcmodel/grouping.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,14 @@ func (g *GroupConnLines) groupInternalSrcOrDst(srcGrouping, groupVsi bool) {
nodesList[i] = line.getSrcOrDst(srcGrouping)
}
groupedEndpoints := groupedEndpointsElems(nodesList)
groupedNodes := g.cacheGrouped.getAndSetEndpointElemFromCache(&groupedEndpoints)
groupedNodes := g.cacheGrouped.getAndSetEndpointElemFromCache(g.config, &groupedEndpoints)
if srcGrouping {
res = append(res, &groupedConnLine{groupedNodes, linesGroup[0].Dst, linesGroup[0].CommonProperties})
} else {
res = append(res, &groupedConnLine{linesGroup[0].Src, groupedNodes, linesGroup[0].CommonProperties})
}
}
g.GroupedLines = unifiedGroupedConnLines(res, g.cacheGrouped, false)
g.GroupedLines = unifiedGroupedConnLines(g.config, res, g.cacheGrouped, false)
}

// Go over the grouping result and set groups s.t. all semantically equiv groups have a unified reference.
Expand All @@ -543,20 +543,20 @@ func (g *GroupConnLines) groupInternalSrcOrDst(srcGrouping, groupVsi bool) {
// the latter is required due to the functionality treating self loops as don't cares - extendGroupingSelfLoops
// in which both srcs and dsts are manipulated but *GroupConnLines is not familiar
// within the extendGroupingSelfLoops context and thus can not be done there smoothly
func unifiedGroupedConnLines(oldConnLines []*groupedConnLine, cacheGrouped *cacheGroupedElements,
func unifiedGroupedConnLines(c *VPCConfig, oldConnLines []*groupedConnLine, cacheGrouped *cacheGroupedElements,
unifyGroupedExternalNodes bool) []*groupedConnLine {
newGroupedLines := make([]*groupedConnLine, len(oldConnLines))
// go over all connections; if src/dst is not external then use groupedEndpointsElemsMap
for i, groupedLine := range oldConnLines {
newGroupedLines[i] = &groupedConnLine{unifiedGroupedElems(groupedLine.Src, cacheGrouped, unifyGroupedExternalNodes),
unifiedGroupedElems(groupedLine.Dst, cacheGrouped, unifyGroupedExternalNodes),
newGroupedLines[i] = &groupedConnLine{unifiedGroupedElems(c, groupedLine.Src, cacheGrouped, unifyGroupedExternalNodes),
unifiedGroupedElems(c, groupedLine.Dst, cacheGrouped, unifyGroupedExternalNodes),
groupedLine.CommonProperties}
}
return newGroupedLines
}

// unifies reference to a single element
func unifiedGroupedElems(srcOrDst EndpointElem,
func unifiedGroupedElems(c *VPCConfig, srcOrDst EndpointElem,
cachedGrouped *cacheGroupedElements,
unifyGroupedExternalNodes bool) EndpointElem {
// external in case external grouping does not need to be unifed
Expand All @@ -570,7 +570,7 @@ func unifiedGroupedElems(srcOrDst EndpointElem,
return srcOrDst
}
if groupedEE, ok := srcOrDst.(*groupedEndpointsElems); ok {
unifiedGroupedEE := cachedGrouped.getAndSetEndpointElemFromCache(groupedEE)
unifiedGroupedEE := cachedGrouped.getAndSetEndpointElemFromCache(c, groupedEE)
return unifiedGroupedEE
}
if groupedExternal, ok := srcOrDst.(*groupedExternalNodes); ok {
Expand Down
10 changes: 5 additions & 5 deletions pkg/vpcmodel/multiExplainability.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ func MultiExplain(srcDstCouples []explainInputEntry, vpcConns map[string]*VPCCon
multiExplanation := make([]explainOutputEntry, len(srcDstCouples))
for i, srcDstCouple := range srcDstCouples {
emptyExplain := &Explanation{
src: srcDstCouple.src.NameForAnalyzerOut(nil),
dst: srcDstCouple.dst.NameForAnalyzerOut(nil),
src: srcDstCouple.src.NameForAnalyzerOut(srcDstCouple.c),
dst: srcDstCouple.dst.NameForAnalyzerOut(srcDstCouple.c),
}
if srcDstCouple.c == nil {
// no vpc config implies missing cross-vpc router between src and dst which are not in the same VPC
Expand All @@ -70,8 +70,8 @@ func MultiExplain(srcDstCouples []explainInputEntry, vpcConns map[string]*VPCCon
multiExplanation[i] = explainOutputEntry{emptyExplain, errConn}
continue
}
explain, errExplain := explainConnectivityForVPC(srcDstCouple.c, srcDstCouple.src.NameForAnalyzerOut(nil),
srcDstCouple.dst.NameForAnalyzerOut(nil),
explain, errExplain := explainConnectivityForVPC(srcDstCouple.c, srcDstCouple.src.NameForAnalyzerOut(srcDstCouple.c),
srcDstCouple.dst.NameForAnalyzerOut(srcDstCouple.c),
srcNodes, dstNodes, nil, connectivity)
if errExplain != nil {
multiExplanation[i] = explainOutputEntry{emptyExplain, errExplain}
Expand Down Expand Up @@ -105,7 +105,7 @@ func getNodesFromEndpoint(c *VPCConfig, endpoint EndpointElem) ([]Node, error) {
}
return disjointNodes, nil
}
return nil, fmt.Errorf("np-Guard error: %v not of type InternalNodeIntf or groupedExternalNodes", endpoint.NameForAnalyzerOut(nil))
return nil, fmt.Errorf("np-Guard error: %v not of type InternalNodeIntf or groupedExternalNodes", endpoint.NameForAnalyzerOut(c))
}

// CreateMultiExplanationsInput given configs and results of connectivity analysis, generates input
Expand Down
8 changes: 4 additions & 4 deletions pkg/vpcmodel/semanticDiff.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ func getVPCResourceInfInOtherConfig(other *VPCConfig, ep VPCResourceIntf,
if !node.IsInternal() {
continue
}
if node.NameForAnalyzerOut(nil) == ep.NameForAnalyzerOut(nil) {
if node.NameForAnalyzerOut(other) == ep.NameForAnalyzerOut(other) {
res = VPCResourceIntf(node)
return res, nil
}
}
} else if diffAnalysis == Subnets {
for _, subnet := range other.Subnets {
if subnet.NameForAnalyzerOut(nil) == ep.NameForAnalyzerOut(nil) {
if subnet.NameForAnalyzerOut(other) == ep.NameForAnalyzerOut(other) {
res = VPCResourceIntf(subnet)
return res, nil
}
Expand Down Expand Up @@ -467,13 +467,13 @@ func (responsiveConnMap *GeneralResponsiveConnectivityMap) actualAlignSrcOrDstGi
if node, ok := src.(Node); ok {
origIPBlock = node.IPBlock()
} else {
return nil, fmt.Errorf(castingNodeErr, node.NameForAnalyzerOut(nil))
return nil, fmt.Errorf(castingNodeErr, node.NameForAnalyzerOut(config))
}
} else {
if node, ok := dst.(Node); ok {
origIPBlock = node.IPBlock()
} else {
return nil, fmt.Errorf(castingNodeErr, node.NameForAnalyzerOut(nil))
return nil, fmt.Errorf(castingNodeErr, node.NameForAnalyzerOut(config))
}
}
if err != nil {
Expand Down
Loading