[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: 10.11.12.12
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: 192.168.1.133, MASK: 255.255.255.0, GW: 192.168.1.1
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 10.11.12.12 (pp) and the other
binded with the address 192.168.1.133 (wn) in listen mode.
When a TCP connection request arrives at the address 192.168.1.133 (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:192.168.100.83, MASK: 255.255.255.0, GW:
192.168.100.1) 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?
Thanks
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
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users