In existing file ./src/bacnet/basic/service/s_whois.c the subroutine Send_WhoIs_Local has lots of statements and comments, many of them misleading, There is no need of initialization of dest beyond .mac_len = 0, since bvlc_set_pdu() in h_bbmd.c calls bip_get_broadcast_addr() again.
129,133c129
< / Who-Is is a global broadcast /
< datalink_get_broadcast_address(&dest);
< / encode the NPDU portion of the packet /
<
< / I added this to make it a local broadcast /
135,149c131
<
< / Not sure why this happens but values are backwards so they need to be
< * reversed /
<
< temp[0] = dest.mac[3];
< temp[1] = dest.mac[2];
< temp[2] = dest.mac[1];
< temp[3] = dest.mac[0];
< temp[4] = dest.mac[5];
< temp[5] = dest.mac[4];
<
< for (loop = 0; loop < 6; loop++) {
< dest.mac[loop] = temp[loop];
< }
/* Who-Is local broadcast */ dest.mac_len = 0;
Anonymous
Corrected in Commit [549010]. Thanks, Duffy!
Related
Commit: [549010]