[Top][All Lists]

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

[lwip-devel] [bug #52770] mdns: move the announcements to a timer callba

From: Douglas
Subject: [lwip-devel] [bug #52770] mdns: move the announcements to a timer callback
Date: Tue, 2 Jan 2018 04:20:34 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0

Follow-up Comment #10, bug #52770 (project lwip):

> NUM_TIMOUTS needs to be increased

Thank you, that had not occurred to me, probably as I am not using pools.
Still, that seems a small burden compared with expecting all the callers to
provision far more space in stack memory.

> Add all services before the netif is up - I think this can be done in most

The original suggestion was to simply not send the announcements from the set
up functions, and that would have had a similar effect. Then add another
public function to trigger the announcement.

Unfortunately this can not solve all the problems because the netif can by up
and running ipv6 before it gets an ipv4 address so there are still these paths
to deal with ipv4 can still change while the network is up. Some caller has
set the ipv4 address, probably another thread, and don't want it to have to
provision for the stack needs of mdns.

Scheduling the announcement seems a fine solution to me, and the timer is the
simple path as it is the only solution to also support NO_SYS.

Anyway we don't have to agree, I can keep that small aspect on a fork, or
would you consider a patch that could work either way?

> Add functions "mdns_stop_announce()" and "mdns_resume_announce()" to
temporarily stop/resume announcing while services are being added

It's not just when services are added, but also on network changes. It does
not seem practical to expect every caller that might trigger an mdns
announcement to guard with these, and changing state in that way looks like a
thread race problem.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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