use IN6_IS_ADDR_MULTICAST to check for multicast address
This commit is contained in:
parent
87f81d15f2
commit
11be23d2e2
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue