I am running LWIP 2.0.3 and I am running into one problem after another. I
have PPPoS running and connection has been established successfully. I
initiated a new PPP session with the following APIs (using the appropriate
pppapi variants where needed):
The connection was established successfully and I have seen pings reaching
the device. However, LWIP is not sending a ping response. Somehow, it cannot
find the appropriate route for the interface when it is trying to send out
the reply and therefore, the data is discarded.
Have anyone encounter this problem who can help? Occasionally the interface
is found and the ping reply will go out. I was testing and saw that I will
ping the device, and after 2 to 3 pings, it will stop responding.
I notice that there is a function called ip4_route() in ip4.c where it seems
to be searching for network interface and can never find any match.
On 09.08.2018 13:30, gzayzay wrote:
> Hello All,
> I am running LWIP 2.0.3 and I am running into one problem after another. I
> have PPPoS running and connection has been established successfully. I
> initiated a new PPP session with the following APIs (using the appropriate
> pppapi variants where needed):
> ppp = pppos_create(&ppp_netif, output_cb, status_cb, ctx_cb);
Did you missed ppp_connect(ppp) after that?
Ok, so I found the cause of the problem. For some reason, the netif list is
begin created and never NULL terminated. The linked list is next->netif
always have a copy of the PPP information. Therefore, when ip4_route(), it
has a "for" loop that is never terminating.
As a quick test, since I know I have one interface, by allowing the check
once, and getting out of the "for" loop, default route which has already
been populated with what was negotiated from the PPP session establishment
While this is not a full solution as I need to investigate why LWIP is not
appropriately setting the netif_list, this seems to be solving my problem
with the route issue for now and I hope LWIP team can also dig deeper into
Not sure if this is a bug in LWIP. This code is in ip4.c in the function