From 04fadb27c6b679afc58284e65dd51e1d71b7e19c Mon Sep 17 00:00:00 2001 From: Patrick Grote Date: Thu, 11 Apr 2024 10:56:38 +0200 Subject: [PATCH] Grr --- ArtNetSharp/ArtNet.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ArtNetSharp/ArtNet.cs b/ArtNetSharp/ArtNet.cs index 68fdb08..1484437 100644 --- a/ArtNetSharp/ArtNet.cs +++ b/ArtNetSharp/ArtNet.cs @@ -129,7 +129,10 @@ private async Task StartListening() UdpReceiveResult received = await _client.ReceiveAsync(); if (!IsInSubnet(LocalIpAddress, UnicastIPAddressInfo.IPv4Mask, received.RemoteEndPoint.Address)) + { + Logger?.LogTrace($"Drop Packet Local:{LocalIpAddress}, Mask: {UnicastIPAddressInfo.IPv4Mask}, Remote: {received.RemoteEndPoint.Address}"); return; + } if (Enabled) ReceivedData?.Invoke(this, new Tuple(LocalIpAddress, received)); } @@ -321,12 +324,12 @@ private void processPacket(AbstractArtPacketCore packet, IPv4Address localIp, IP Logger?.LogWarning($"Received Non-Art-Net packet from {sourceIp}, discarding"); return; } -#if DEBUG +//#if DEBUG //if (IPv4Address.Equals(localIp, sourceIp)) // return; Logger.LogTrace($"Received Packet from {sourceIp} -> {packet}"); -#endif +//#endif instances.ForEach(_instance => { ((IInstance)_instance).PacketReceived(packet, localIp, sourceIp); }); }