[Top][All Lists]

[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


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
netif: netmask of interface  set to
 eteif: GW sasd dbreeissn go fc hinatnegrefdace
  snete ttiof
 nIePti fa:d darddeesds  iontfe rifnatcee pp IP addr 0.0.0.r0 netfmask 
ace  set to
netif: netif: setting default interface pp
netmask of interface  set to
netif: GW address of interface  set to
netif: added interface em IP addr netmask gw
ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:c8:d7:19:ee:1f:fc, type:806
etharp_update_arp_entry: - 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.

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,


>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]