From 1df5cac37ca356395485a20a4f67a8f4b8f1986f Mon Sep 17 00:00:00 2001
From: Oliver Herms <oliver.herms@exaring.de>
Date: Sat, 27 Oct 2018 11:30:18 +0200
Subject: [PATCH] Cleanup

---
 net/ip.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/ip.go b/net/ip.go
index 83d86c3b..dbf17fe3 100644
--- a/net/ip.go
+++ b/net/ip.go
@@ -230,11 +230,11 @@ func (ip IP) ToNetIP() net.IP {
 
 // BitAtPosition returns the bit at position pos
 func (ip IP) BitAtPosition(pos uint8) bool {
-	if !ip.isLegacy {
-		return ip.bitAtPositionIPv6(pos)
+	if ip.isLegacy {
+		return ip.bitAtPositionIPv4(pos)
 	}
 
-	return ip.bitAtPositionIPv4(pos)
+	return ip.bitAtPositionIPv6(pos)
 }
 
 func (ip IP) bitAtPositionIPv4(pos uint8) bool {
-- 
GitLab