mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-07 02:02:54 +03:00
This fixes a bug reported by Daniel Petrie: "When the coap-client is used and a local address to bind to is specified, but the local port is not specified, I get errors for the response coming in from an unexpected interface and the response is dropped/ignored." The solution here is to call getsockname() after successful bind() in coap_new_endpoint() to set ep->addr to the actual transport address being used.