coap_io.c: Include multicast addresses in is_local_if()

is_local_if() checks if a message's destination address matches
a local interface. As multicast requests are allowed on either
interface, this function now returns true when the destination
address is a multicast address.
This commit is contained in:
Olaf Bergmann committed 2015-06-10 18:25:32 +02:00
1 parent ee931e8f37
commit 155adae29a
1 file changed
+2 -1
+2 -1
View File
@@ -396,7 +396,8 @@ coap_packet_get_memmapped(coap_packet_t *packet, unsigned char **address, size_t
*/
static inline int
is_local_if(const coap_address_t *local, const coap_address_t *dst) {
return coap_address_isany(local) || coap_address_equals(dst, local);
return coap_address_isany(local) || coap_address_equals(dst, local) ||
coap_is_mcast(dst);
}
ssize_t