Merge pull request #7336 from SeppoTakalo/fix_udp_filtering

Fix connected UDPSocket filtering
pull/7361/head
Cruz Monrreal 2018-06-28 10:06:52 -05:00 committed by GitHub
commit cb000ceeab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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); nsapi_size_or_error_t recv = _stack->socket_recvfrom(_socket, address, buffer, size);
// Filter incomming packets using connected peer address // Filter incomming packets using connected peer address
if (recv >= 0 && _remote_peer && _remote_peer == *address) { if (recv >= 0 && _remote_peer && _remote_peer != *address) {
continue; continue;
} }