[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: Sylvain Rochet
Subject: Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)
Date: Thu, 10 Apr 2014 18:34:43 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hello Charles,

On Thu, Apr 10, 2014 at 03:55:26PM +0000, address@hidden wrote:
> Hi Sylvain,
> Thank you for your reply. I really appreciate your help. The below are a few 
> comments and more observations.
> >Well, ip_forward() should call netif->output(), which in our case is 
> >ppp_netif_output_ip4(), could you first check that ?
> Sorry, I may confuse you about which direction the problem is. 
> Actually, the problem is it doesn't output the corresponding Ethernet 
> packets based on the incoming PPP packets.
> [...]
> etharp_output: could not allocate room for header.
> Now, what I really don't understand is the forwarded and non-forwarded 
> IP packets both need room for Ethernet header before sending out, why 
> one succeeded in making room for Ethernet header and the other failed. 
> Is it because these two type packets use different types of PBUF?

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.


Attachment: 0000-check-ppp-forwarding-to-ethernet.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature

reply via email to

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