Skip to content

Commit

Permalink
coap_address.c: Broadcast address cannot be local IP address
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdeep1 committed Oct 19, 2023
1 parent 48753b1 commit cd1a7de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/coap_address.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit cd1a7de

Please sign in to comment.