Skip to content

Commit cb000ce

Browse files
author
Cruz Monrreal
authored
Merge pull request #7336 from SeppoTakalo/fix_udp_filtering
Fix connected UDPSocket filtering
2 parents bf21bac + f2c0c4e commit cb000ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/netsocket/UDPSocket.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ nsapi_size_or_error_t UDPSocket::recvfrom(SocketAddress *address, void *buffer,
124124
nsapi_size_or_error_t recv = _stack->socket_recvfrom(_socket, address, buffer, size);
125125

126126
// Filter incomming packets using connected peer address
127-
if (recv >= 0 && _remote_peer && _remote_peer == *address) {
127+
if (recv >= 0 && _remote_peer && _remote_peer != *address) {
128128
continue;
129129
}
130130

0 commit comments

Comments
 (0)