Skip to content

Commit b31004e

Browse files
haim-kermanyadisos
andauthored
impl (#100)
Co-authored-by: Adi Sosnovich <82078442+adisos@users.noreply.github.com>
1 parent 633f650 commit b31004e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/netset/ipblock.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ func intervalToCidrList(ipRange interval.Interval) []string {
468468

469469
func parseIP(ip string) (int64, error) {
470470
startIP := net.ParseIP(ip)
471-
if startIP == nil {
471+
if startIP == nil || startIP.To4() == nil {
472472
return 0, fmt.Errorf("%v is not a valid ipv4", ip)
473473
}
474474
return int64(binary.BigEndian.Uint32(startIP.To4())), nil

0 commit comments

Comments
 (0)