Menu

#76 Send_WhoIs_Local only needs initialization of dest.mac_len = 0;

v1.0.1
accepted
None
1
2021-04-26
2021-04-12
No

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;

Discussion

  • Steve Karg

    Steve Karg - 2021-04-26
    • status: open --> accepted
    • assigned_to: Steve Karg
    • Group: v0.8.4 --> v1.0.1
     
  • Steve Karg

    Steve Karg - 2021-04-26

    Corrected in Commit [549010]. Thanks, Duffy!

     

    Related

    Commit: [549010]

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB