lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] ppp-new IP forwarding only works one direction (Etherne


From: LMao
Subject: Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)
Date: Thu, 10 Apr 2014 17:30:12 +0000

Sylvain,

It seems the patch makes things worse - PPP connection couldn’t build-up 
anymore. Below is the complete log message after applying the patch. It seems 
the code stalled at very early stage. 

*** FreeRTOS Demo Started! ***

netif_set_ipaddr: netif addrnetif: IP address of interface  set to 0.0.0.0
netif: netmask of interface  set to 0.0.0.0
 eteif: GW sasd dbreeissn go fc hinatnegrefdace
  snete ttiof 0.0.0.0:
 nIePti fa:d darddeesds  iontfe rifnatcee pp IP addr 0.0.0.r0 netfmask 0.0.0.0 
gw 0.0.0.0
ace  set to 192.168.0.50
netif: netif: setting default interface pp
netmask of interface  set to 255.255.255.0
netif: GW address of interface  set to 192.168.0.1
etharp_timer
etharp_timer
etharp_timer
etharp_timer
etharp_timer
netif: added interface em IP addr 192.168.0.50 netmask 255.255.255.0 gw 
192.168.0.1
ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:c8:d7:19:ee:1f:fc, type:806
etharp_update_arp_entry: 0.0.0.0 - c8:d7:19:ee:1f:fc
etharp_update_arp_entry: will not add non-unicast IP address to ARP cache
etharp_arp_input: incoming ARP request
etharp_arp_input: ARP request was not for us.
etharp_timer
etharp_timer

Regarding the patch, my compiler complains the following statement
      u8_t *payload = next_pbuf->payload + PBUF_LINK_HLEN;
so I made a small change to make it work with my compiler
     u8_t *payload = (u8_t*)next_pbuf->payload + PBUF_LINK_HLEN; 

Thanks again,

Charels

>Oh dear, now I see what is happening.
>PPP header is smaller than Ethernet header, plus PPPoS needs to reallocate a 
>new PPP to do HDLC encoding, so Ethernet to PPPoS forwarding will always works.
>But, PPPoS to Ethernet will not work, because there is not enough header space 
>in the pbuf to put Ethernet header in place of the PPP header.
>This is actually a lwIP design issue, the only way we can fix that is by 
>adding a configuration option so pbuf from PPP are allocated with enough extra 
>space so a Ethernet header will fit in place of a PPP header.
>So, let's try that with a stupid patch, at least it will confirm what I 
>thought is happening.


reply via email to

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