From 8ff334d7565cfc2dd81125b82b2e0cddad7c1cfc Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Mon, 24 Mar 2025 15:04:46 +0000 Subject: [PATCH] coap_address.c: Check for AF_UNIX in coap_address_equals() --- src/coap_address.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/coap_address.c b/src/coap_address.c index 82a88e65..0f1a99ed 100644 --- a/src/coap_address.c +++ b/src/coap_address.c @@ -99,6 +99,11 @@ coap_address_equals(const coap_address_t *a, const coap_address_t *b) { memcmp(&a->addr.sin6.sin6_addr, &b->addr.sin6.sin6_addr, sizeof(struct in6_addr)) == 0; #endif /* COAP_IPV6_SUPPORT */ +#if COAP_AF_UNIX_SUPPORT + case AF_UNIX: + return memcmp(&a->addr.cun.sun_path, &b->addr.cun.sun_path, + sizeof(a->addr.cun.sun_path)) == 0; +#endif /* COAP_AF_UNIX_SUPPORT */ default: /* fall through and signal error */ ; }