diff --git a/net/helper.go b/net/helper.go
index 4f7319cddfd92ef975819b143e4c03488ec22fb8..4b82b2425fdc199023c675c904e92cd6bcce27b3 100644
--- a/net/helper.go
+++ b/net/helper.go
@@ -4,5 +4,6 @@ import "net"
 
 // IPv4ToUint32 converts an `net.IP` to an uint32 interpretation
 func IPv4ToUint32(ip net.IP) uint32 {
+	ip = ip.To4()
 	return uint32(ip[3]) + uint32(ip[2])<<8 + uint32(ip[1])<<16 + uint32(ip[0])<<24
 }
diff --git a/net/helper_test.go b/net/helper_test.go
index 7a267c3c9e26715bd9b14e3579265e2057aac8db..d5a038cbb6bd2683b50ba50c658fae797e46d39c 100644
--- a/net/helper_test.go
+++ b/net/helper_test.go
@@ -3,6 +3,8 @@ package net
 import (
 	"testing"
 
+	"net"
+
 	"github.com/stretchr/testify/assert"
 )
 
@@ -23,6 +25,10 @@ func TestIPv4ToUint32(t *testing.T) {
 			input:    []byte{172, 24, 5, 1},
 			expected: 2887255297,
 		},
+		{
+			input:    net.ParseIP("172.24.5.1"),
+			expected: 2887255297,
+		},
 	}
 
 	for _, test := range tests {