Skip to content

Commit

Permalink
range updates
Browse files Browse the repository at this point in the history
  • Loading branch information
techBeck03 committed Mar 4, 2021
1 parent dd36af3 commit 9734f20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion range.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (c *Client) CheckIfRangeContainsRange(query IPsWithinRangeQuery) (bool, err

for matchFlag == false {
for _, addressRange := range ret.Results {
if ipWithinRange(addressRange.StartAddress, addressRange.EndAddress, query.StartAddress) || ipWithinRange(addressRange.StartAddress, addressRange.EndAddress, query.EndAddress) {
if addressRange.Ref != query.Ref && (ipWithinRange(addressRange.StartAddress, addressRange.EndAddress, query.StartAddress) || ipWithinRange(addressRange.StartAddress, addressRange.EndAddress, query.EndAddress)) {
matchFlag = true
break
}
Expand Down
1 change: 1 addition & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ type RangeQueryResult struct {

// IPsWithinRangeQuery object
type IPsWithinRangeQuery struct {
Ref string
CIDR string
StartAddress string
EndAddress string
Expand Down

0 comments on commit 9734f20

Please sign in to comment.