coap_address.c: Check for AF_UNIX in coap_address_equals()

This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2025-03-24 15:31:05 +00:00
1 parent 29410f1f96
commit 8ff334d756
1 file changed
+5
+5
View File
@@ -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 */
;
}