diff --git a/net.c b/net.c index b2aefcd2..1d0c28ea 100644 --- a/net.c +++ b/net.c @@ -336,6 +336,9 @@ coap_new_context( coap_register_option(c, COAP_OPTION_BLOCK1); c->endpoint = coap_new_endpoint(listen_addr, COAP_ENDPOINT_NOSEC); +#ifdef WITH_LWIP + c->endpoint->context = c; +#endif if (c->endpoint == NULL) { goto onerror; }