Skip to content

Commit

Permalink
Fix: use sorted cidr list (#1156)
Browse files Browse the repository at this point in the history
  • Loading branch information
Loyalsoldier authored Jul 22, 2021
1 parent e2d526c commit 470acef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/router/condition_geoip.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (m *GeoIPMatcher) Init(cidrs []*CIDR) error {
m.ip6 = make([]ipv6, 0, ip6Count)
m.prefix6 = make([]uint8, 0, ip6Count)

for _, cidr := range cidrs {
for _, cidr := range cidrList {
ip := cidr.Ip
prefix := uint8(cidr.Prefix)
switch len(ip) {
Expand Down

0 comments on commit 470acef

Please sign in to comment.