Skip to content

Commit

Permalink
Minor simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
hknutzen committed Jul 31, 2023
1 parent 715e70a commit 2350c61
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions go/pkg/pass1/find-subnets.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ func (c *spoc) findSubnetsInNatDomain0(domains []*natDomain, networks netList) {

// Mark and analyze networks having identical IP/mask in
// current NAT domain.
hasIdentical := make(map[*network]bool)
for n1, l := range identical {
var filtered netList
if visible[n1] {
Expand All @@ -404,9 +403,6 @@ func (c *spoc) findSubnetsInNatDomain0(domains []*natDomain, networks netList) {
if len(filtered) <= 1 {
continue
}
for _, n := range filtered {
hasIdentical[n] = true
}

// Compare pairs of networks with identical IP/mask.
natOther := filtered[0]
Expand Down Expand Up @@ -525,7 +521,7 @@ func (c *spoc) findSubnetsInNatDomain0(domains []*natDomain, networks netList) {
// if current status of subnet is not known,
// since status may change later.
if bignet.zone == subnet.zone {
if subnet.hasOtherSubnet || hasIdentical[subnet] {
if subnet.hasOtherSubnet || nextVisible(subnet) != nil {
bignet.hasOtherSubnet = true
} else {
//debug("Append %s %s", subnet, bignet)
Expand Down

0 comments on commit 2350c61

Please sign in to comment.