Skip to content

Commit

Permalink
net/udp/udp_finddev.c: Fix for network byte-order issue when checking…
Browse files Browse the repository at this point in the history
… if an address is a multicast address.
  • Loading branch information
Jake Choy authored and gregory-nutt committed Jul 17, 2018
1 parent 1ef922f commit b1daa22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/udp/udp_finddev.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ FAR struct net_driver_s *udp_find_raddr_device(FAR struct udp_conn_s *conn)
*/

if (conn->u.ipv4.raddr == INADDR_BROADCAST ||
IN_MULTICAST(conn->u.ipv4.raddr))
IN_MULTICAST(NTOHL(conn->u.ipv4.raddr)))
{
/* Make sure that the socket is bound to some non-zero, local
* address. Zero is used as an indication that the laddr is
Expand Down

0 comments on commit b1daa22

Please sign in to comment.