Skip to content

Commit

Permalink
coap_address.c: Fix IPv4 broadcast checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdeep1 committed Oct 19, 2023
1 parent bb1a635 commit 68c7ec1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coap_address.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ 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;
if (b_ipv4[bcst_cnt].s_addr != ipv4.s_addr)
if (b_ipv4[bcst_cnt].s_addr != ((struct sockaddr_in *)ife->ifa_addr)->sin_addr.s_addr)
bcst_cnt++;
}
ife = ife->ifa_next;
Expand Down

0 comments on commit 68c7ec1

Please sign in to comment.