net/udp/udp_finddev.c: Fix for network byte-order issue when checking if an address is a multicast address.

This commit is contained in:
Jake Choy 2018-07-17 11:18:11 -06:00 committed by Gregory Nutt
parent 1ef922faac
commit b1daa22040

View file

@ -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