From b1daa22040e8cf36ce702d78621871e2511534f7 Mon Sep 17 00:00:00 2001 From: Jake Choy Date: Tue, 17 Jul 2018 11:18:11 -0600 Subject: [PATCH] net/udp/udp_finddev.c: Fix for network byte-order issue when checking if an address is a multicast address. --- net/udp/udp_finddev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/udp/udp_finddev.c b/net/udp/udp_finddev.c index 2579070b9cd..5ebaad42065 100644 --- a/net/udp/udp_finddev.c +++ b/net/udp/udp_finddev.c @@ -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