Skip to content

Commit

Permalink
Fix ASN targeting support
Browse files Browse the repository at this point in the history
  • Loading branch information
abh committed Feb 13, 2018
1 parent 1756034 commit 602643d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion targeting/geoip2/geoip2.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (g *GeoIP2) GetASN(ip net.IP) (string, int, error) {
return "", 0, err
}

c, err := r.ISP(ip)
c, err := r.ASN(ip)
if err != nil {
return "", 0, fmt.Errorf("lookup ASN for '%s': %s", ip.String(), err)
}
Expand Down
2 changes: 1 addition & 1 deletion targeting/targeting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestGetTargets(t *testing.T) {
tests = append(tests,
test{"@ continent regiongroup country region asn ip",
[]string{"[207.171.1.1]", "[207.171.1.0]", "as7012", "us-ca", "us-west", "us", "north-america", "@"},
"",
"207.171.1.1",
})
}

Expand Down

0 comments on commit 602643d

Please sign in to comment.