From 11be23d2e2f6bc55eedc120143383a700f8e9f16 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 24 Jun 2016 08:46:42 +0200 Subject: [PATCH] use IN6_IS_ADDR_MULTICAST to check for multicast address --- net/respondd/src/respondd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/respondd/src/respondd.c b/net/respondd/src/respondd.c index 71f9fcc..1c3231b 100644 --- a/net/respondd/src/respondd.c +++ b/net/respondd/src/respondd.c @@ -369,7 +369,7 @@ static void serve(int sock) { break; } // Now "cmsg != NULL" tests whether we found the destination address at all. - const bool is_multicast = (cmsg != NULL) && destaddr.s6_addr[0] == 0xFF; + const bool is_multicast = (cmsg != NULL) && IN6_IS_ADDR_MULTICAST(&destaddr); const char *str = json_object_to_json_string_ext(result, JSON_C_TO_STRING_PLAIN);