From 5812d1be293198f35d0641dddf586d1279a20496 Mon Sep 17 00:00:00 2001 From: Stepanov Alexander Date: Fri, 13 Nov 2020 15:59:49 +0300 Subject: [PATCH] fix cast to uint --- AutoTunnel/Listener.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AutoTunnel/Listener.cs b/AutoTunnel/Listener.cs index 7aaf6aa..edf416d 100644 --- a/AutoTunnel/Listener.cs +++ b/AutoTunnel/Listener.cs @@ -166,7 +166,7 @@ private void StartInternal() } // var sourceIp = decBuf[12] + "." + decBuf[13] + "." + decBuf[14] + "." + decBuf[15]; - var sourceIp = new IPAddress(decBuf[12] | (decBuf[13] << 8) | (decBuf[14] << 16) | (decBuf[15] << 24)); + var sourceIp = new IPAddress(decBuf[12] | (decBuf[13] << 8) | (decBuf[14] << 16) | (((uint)decBuf[15]) << 24)); // if we already has option to establish connection to this ip, do not add additional sender if (!_storage.OutgoingConnectionAdresses.Contains(sourceIp)) {