lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #9523] MDNS responder should reply after a random ti


From: Jasper Verschueren
Subject: [lwip-devel] [patch #9523] MDNS responder should reply after a random timeout
Date: Tue, 30 Oct 2018 06:27:40 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36

Follow-up Comment #18, patch #9523 (project lwip):

The approach suggested below is not perfect. To implement the random delays we
need to transform the code a bit further. With our mind on the other stuff
that needs to be implemented.

I tried to do that, you can find the patch attached.
The mdns.c started to get very big, that is why I made 2 extra modules.
mdns_domain.c contains all domain related generation functions. These are
utility functions for the other to mDNS modules. mdns_out.c contains all the
output functionality. A clean split is made between defining what the packet
should be and generating the blob of data to be send out. mdns_out contains a
lot of functionality only needed to generate the packet. These are now
separated from the other modules. Only a few functions are needed to be global
to the other mdns modules. 

I worked with sys_timeout to make the random timeouts possible. Because a lot
of different timeouts are needed, you need to increase the
MEMP_NUM_SYS_TIMEOUT with 8.

I solved some smaller bugs with for example TTL along the way. They needed to
be correct to test the full functionality of the delaying. Also the source
address check is added. 

The RFC did not make it easy to implement ... You should mainly read section 6
Responding to find the why of things. 

One question about NETIF_TO_HOST function: why can't we add the module to the
standard netif client data like we do for autoip, dhcp,...? I need it to be
accessible in all modules and that would make it cleaner. 

Please let me know your comments.
 


(file #45329)
    _______________________________________________________

Additional Item Attachment:

File name: 0001-mDNS-responder-upgraded-with-delay-functionality-cle.patch
Size:152 KB


    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?9523>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]