We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4c5ef0 commit 2989002Copy full SHA for 2989002
libcalico-go/lib/backend/model/rule.go
@@ -130,7 +130,9 @@ func (r Rule) AllNotDstNets() []*net.IPNet {
130
func joinNets(nets []*net.IPNet) string {
131
parts := make([]string, len(nets))
132
for i, n := range nets {
133
- parts[i] = n.String()
+ if n != nil {
134
+ parts[i] = n.String()
135
+ }
136
}
137
return strings.Join(parts, ",")
138
libcalico-go/lib/backend/syncersv1/updateprocessors/rules.go
@@ -278,7 +278,9 @@ func NormalizeIPNets(nets []string) []*cnet.IPNet {
278
279
out := make([]*cnet.IPNet, len(nets))
280
281
- out[i] = normalizeIPNet(n)
+ if x := normalizeIPNet(n); x != nil {
282
+ out[i] = x
283
284
285
return out
286
0 commit comments