Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fixed geoip lookup to check for invalid IP ranges
The geoip lookup function now returns the empty string for IP addresses that are not present in the table. New tests for invalid IP address lookups were added and a bug fix for checking an invalid returned index
- Loading branch information
Showing
with
34 additions
and 3 deletions.
- +23 −1 broker/geoip.go
- +3 −1 broker/metrics.go
- +8 −1 broker/snowflake-broker_test.go
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters