Esp-idf: lwip compile error (IDFGH-1655)

Created on 9 Aug 2019  路  6Comments  路  Source: espressif/esp-idf

In menuconfig disabling this option:
LWIP->TCP->Queue incoming out-of-order segments (CONFIG_TCP_QUEUE_OOSEQ)
causes this error:

components/lwip/lwip/src/core/pbuf.c: In function 'pbuf_free':
components/lwip/lwip/src/core/pbuf.c:792:29: error: dereferencing pointer to incomplete type 'struct netif'
               && p->l2_owner->l2_buffer_free_notify != NULL) {

esp-idf version: v3.2

Most helpful comment

@vikramvel @chegewara @joedeveloper
I'm sorry I didn't reply in time.
I found the root cause.
In the pbuf. c file,add lwip/netif.h.such as:
#include "lwip/netif.h"

All 6 comments

Similar situation on commit 6ccb4cf5b7d1fdddb8c2492f9cbc926abaf230df (HEAD, tag: v3.3)

@chegewara

We will debug the problem as soon as possible

Hi, I am facing the same error.
Is this issue has been fixed ?

@vikramvel @chegewara @joedeveloper
I'm sorry I didn't reply in time.
I found the root cause.
In the pbuf. c file,add lwip/netif.h.such as:
#include "lwip/netif.h"

function signature might be miss typed in lwip/netif.h

void (l2_buffer_free_notify)(void *user_buf)
===>
void (
l2_buffer_free_notify)(struct netif *netif,void *user_buf)

this function might be related to pppos and ip forward functional in NAPT function

Sorry for replying late, the fix has been available at https://github.com/espressif/esp-idf/commit/db38a4e06826d052858e70b5464d0a07f9d902e5, feel free to reopen if the issue still happens. Thanks.

Was this page helpful?
0 / 5 - 0 ratings