Skip to content

Commit

Permalink
revert some changes + add mutex to ContainsNetString
Browse files Browse the repository at this point in the history
Signed-off-by: NikitaSkrynnik <nikita.skrynnik@xored.com>
  • Loading branch information
NikitaSkrynnik committed Mar 19, 2024
1 parent 6169841 commit 33195c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/networkservice/connectioncontext/ipcontext/vl3/ipam.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,7 @@ func (p *IPAM) Reset(ctx context.Context, prefix string, excludePrefies []string

// ContainsNetString checks if ippool contains net
func (p *IPAM) ContainsNetString(ipNet string) bool {
p.Lock()
defer p.Unlock()
return p.ipPool.ContainsNetString(ipNet)

Check warning on line 151 in pkg/networkservice/connectioncontext/ipcontext/vl3/ipam.go

View check run for this annotation

Codecov / codecov/patch

pkg/networkservice/connectioncontext/ipcontext/vl3/ipam.go#L148-L151

Added lines #L148 - L151 were not covered by tests
}

0 comments on commit 33195c0

Please sign in to comment.