From 95f9f9878476a06faf8353e279007c90f54dadb8 Mon Sep 17 00:00:00 2001 From: Oliver Herms <oliver.herms@exaring.de> Date: Wed, 16 May 2018 18:53:16 +0200 Subject: [PATCH] Fixing IPv4ToUint32 --- net/helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/helper.go b/net/helper.go index efb67596..4f7319cd 100644 --- a/net/helper.go +++ b/net/helper.go @@ -4,5 +4,5 @@ import "net" // IPv4ToUint32 converts an `net.IP` to an uint32 interpretation func IPv4ToUint32(ip net.IP) uint32 { - return uint32(ip[0]) + uint32(ip[1])<<8 + uint32(ip[2])<<16 + uint32(ip[3])<<24 + return uint32(ip[3]) + uint32(ip[2])<<8 + uint32(ip[1])<<16 + uint32(ip[0])<<24 } -- GitLab