Skip to content

Commit

Permalink
Merge pull request #7336 from SeppoTakalo/fix_udp_filtering
Browse files Browse the repository at this point in the history
Fix connected UDPSocket filtering
  • Loading branch information
Cruz Monrreal committed Jun 28, 2018
2 parents bf21bac + f2c0c4e commit cb000ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion features/netsocket/UDPSocket.cpp
Expand Up @@ -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;
}

Expand Down

0 comments on commit cb000ce

Please sign in to comment.