Browse Source

caddytls: Fix `MatchRemoteIP` provisoning with multiple CIDR ranges (#4522)

master
GallopingKylin 3 years ago
committed by GitHub
parent
commit
66de438a98
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      modules/caddytls/matchers.go

4
modules/caddytls/matchers.go

@ -86,14 +86,14 @@ func (m *MatchRemoteIP) Provision(ctx caddy.Context) error {
if err != nil {
return err
}
m.cidrs = cidrs
m.cidrs = append(m.cidrs, cidrs...)
}
for _, str := range m.NotRanges {
cidrs, err := m.parseIPRange(str)
if err != nil {
return err
}
m.notCidrs = cidrs
m.notCidrs = append(m.notCidrs, cidrs...)
}
return nil
}

Loading…
Cancel
Save