Skip to content

Commit 10338ca

Browse files
committed
Fix excludeSubnets bug found by rabbitai
Signed-off-by: Patryk Diak <[email protected]>
1 parent 49ae513 commit 10338ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go-controller/pkg/allocator/ip/subnet/allocator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ func (allocator *allocator) AddOrUpdateSubnet(config SubnetConfig) error {
126126
if err != nil {
127127
return fmt.Errorf("failed to exclude subnet %s for %s: %w", excludeFromIPAM, config.Name, err)
128128
}
129+
excluded = true
129130
}
130-
excluded = true
131131
}
132132
if !excluded {
133133
return fmt.Errorf("failed to exclude subnet %s for %s: not contained in any of the subnets", excludeFromIPAM, config.Name)

0 commit comments

Comments
 (0)