[Top][All Lists]

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

[lwip-devel] [bug #52763] mdns: move data off the stack and dynamically

From: Erik Ekman
Subject: [lwip-devel] [bug #52763] mdns: move data off the stack and dynamically allocate data.
Date: Wed, 3 Jan 2018 07:42:59 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36

Follow-up Comment #8, bug #52763 (project lwip):

Sorry, we reverted the async send commit, so your patch is out of date again.

mdns_service_free() has a copy-paste error:
 if (service) {

I don't really see the point of keeping the host name in a separately
allocated block. Its lifetime is the same as the surrounding struct, and it
only makes a few bytes difference. Also, the name might have to be adjusted so
it is good to know the amount of space available. This also applies to the
char arrays in the service struct.

You cannot count on any string functions being available, especially strndup
which does an allocation. lwIP must not have any dependencies outside of what
the port is expected to provide. 

Please update the function comments in the cases where you change the method

The late declaration of err_t res will not compile on stricter systems.

The old mdnsapi_* functions are still in the header file.

Please split out the LWIP_MDNS_RESPONDER_QUEUE_ANNOUNCEMENTS changes into a
separate patch.

Does this function still compile without the int declaration?
 mdns_resp_remove_netif(struct netif *netif)
-  int i;

The dns_hdr struct is 12 bytes, that should be small enough to keep it on the


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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