From f2c0c4e24884c0721fbd463b7ea92856a1c30b82 Mon Sep 17 00:00:00 2001 From: Seppo Takalo Date: Tue, 26 Jun 2018 17:01:19 +0300 Subject: [PATCH] Fix connected UDPSocket filtering Was dropping all packets from connected peer --- features/netsocket/UDPSocket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/netsocket/UDPSocket.cpp b/features/netsocket/UDPSocket.cpp index c7c22e8af9..b798b204be 100644 --- a/features/netsocket/UDPSocket.cpp +++ b/features/netsocket/UDPSocket.cpp @@ -124,7 +124,7 @@ nsapi_size_or_error_t UDPSocket::recvfrom(SocketAddress *address, void *buffer, nsapi_size_or_error_t recv = _stack->socket_recvfrom(_socket, address, buffer, size); // Filter incomming packets using connected peer address - if (recv >= 0 && _remote_peer && _remote_peer == *address) { + if (recv >= 0 && _remote_peer && _remote_peer != *address) { continue; }