From 155adae29a7936596ecfe23a01db0cc949e80c4b Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Wed, 10 Jun 2015 18:25:32 +0200 Subject: [PATCH] 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. --- src/coap_io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coap_io.c b/src/coap_io.c index aa931970..057462f5 100644 --- a/src/coap_io.c +++ b/src/coap_io.c @@ -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