[Top][All Lists]

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

Re: [lwip-users] LwIP - 2 netifs and VPN

From: Andrea Marangon
Subject: Re: [lwip-users] LwIP - 2 netifs and VPN
Date: Thu, 12 Jul 2018 12:34:11 +0000
User-agent: eM_Client/6.0.24985.0

Hi Sergio,
I try to describe my scenario:

I'm using lwip on the ESP8266 wifi module.

This module is connected to my board and communicates via PPPoS (the PPP client is the Wifi module) then there is a first network interface ("pp") and its addresses are assigned by the server (my board).

PPP --> IP:

The second network interface is the wifi ("wn") and its addresses are assigned when it connects to a router in a local network.

WIFI --> IP:, MASK:, GW:

Now I need to exchange TCP and UDP packets from Wifi to my board and vice versa.

To do this I used the raw API.
I created two TCP PCB: one connected to (pp) and the other binded with the address (wn) in listen mode.

When a TCP connection request arrives at the address (and specific port), the connection is accepted and I can send and receive packets between the two pcb using the respective received callbacks.

Similarly I do for the UDP connection.

This system works if the connecting host is in the same subnet.
I tried to connect via VPN (IP:, MASK:, GW: but I can only receive UDP packets.

I could see that the TCP connection is not accepted because the wrong network interface is returned in ip4_route ()

Is this behavior normal or I'm wrong with some configuration options?

Analyzing the code I think I have to act on the macro LWIP_HOOK_IP4_ROUTE_SRC... is this the right way?


Andrea Marangon

------ Messaggio originale ------
Da: "Sergio R. Caprile" <address@hidden>
A: address@hidden
Inviato: 11/07/2018 21:18:37
Oggetto: Re: [lwip-users] LwIP - 2 netifs and VPN

I fail to see what you are doing and what you are trying to do.
Do you mind putting names and addresses and describe what you do and the
expected behaviour ?

lwip-users mailing list

reply via email to

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