mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-12 19:40:39 +03:00
coap_address.c: Broadcast address cannot be local IP address
This commit is contained in:
1 parent
48753b155b
commit
cd1a7de0f2
1 file changed
+2
-1
+2
-1
@@ -219,7 +219,8 @@ coap_is_bcast(const coap_address_t *a) {
|
||||
if (ife->ifa_addr && ife->ifa_addr->sa_family == AF_INET &&
|
||||
ife->ifa_flags & IFF_BROADCAST) {
|
||||
b_ipv4[bcst_cnt].s_addr = ((struct sockaddr_in *)ife->ifa_broadaddr)->sin_addr.s_addr;
|
||||
bcst_cnt++;
|
||||
if (b_ipv4[bcst_cnt].s_addr != ipv4.s_addr)
|
||||
bcst_cnt++;
|
||||
}
|
||||
ife = ife->ifa_next;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user