buglwIP - A Lightweight TCP/IP stack - Bugs: bug #58551, mDNS: incorrect probe timings...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #58551: mDNS: incorrect probe timings during rate limiting

Submitted by:  Jasper Verschueren <jasperv>
Submitted on:  Fri 12 Jun 2020 10:07:17 AM UTC
 
Category:  apps Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
lwIP version:  * git head
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Fri 12 Jun 2020 10:07:17 AM UTC, original submission:  

Commit:6302423d mdns: handle tiebreaking loose like conflict, introduces a bug in the probing part of mDNS.

Most changes in this commit are valid, except the following:

   @@ -2294,8 +2307,13 @@ mdns_probe_and_announce(void* arg)
            mdns->sent_num = 0;
          }

   

   -      sys_timeout(MDNS_PROBE_DELAY_MS, mdns_probe_and_announce, netif);
   -
   +      if (mdns->sent_num && mdns->rate_limit_activated == 1) {
   +        /* delay second probe if rate limiting activated */
   +        sys_timeout(MDNS_PROBE_MAX_CONFLICTS_TIMEOUT, mdns_probe_and_announce, netif);
   +      }
   +      else {
   +        sys_timeout(MDNS_PROBE_DELAY_MS, mdns_probe_and_announce, netif);
   +      }
          break;
        case MDNS_STATE_ANNOUNCE_WAIT:
        case MDNS_STATE_ANNOUNCING:

This changes the time in between probes to 5 seconds in case of rate limiting.
This is against RFC, the RFC only specifies to wait 5 seconds before restarting.
RFC6762 section 8.1 Probing:

   If fifteen conflicts occur within any ten-second period, then the
   host MUST wait at least five seconds before each successive
   additional probe attempt.  This is to help ensure that, in the event
   of software bugs or other unanticipated problems, errant hosts do not
   flood the network with a continuous stream of multicast traffic.  For
   very simple devices, a valid way to comply with this requirement is
   to always wait five seconds after any failed probe attempt before
   trying again.

So it states that we should wait 5 seconds before we try probing again.
It doesn't specify that we need to change our probing timings from 250 ms to 5 seconds.

This particular change should be reverted.
Attached a patch can be found.

Kind regards,
Jasper

Jasper Verschueren <jasperv>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jasperv (Submitted the item)
  • -email is unavailable- added by jasperv
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-06-12 jasperv Attached File- => Added 0001-mDNS-fix-bug-with-probe-timing-during-rate-limiting.patch, #49246
        Carbon-Copy- => Added dgirault

    Back to the top


    Powered by Savane 3.9