Hi Sylvain, Good news, I got it work with your patch plus the replacement of (PBUF_LINK_HLEN +2), however, set ETH_PAD_SIZE to 2 actually doesn't work. It seems fail at ARP and infinitely repeat with the following debug messages:
ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:c8:d7:19:ee:1f:fc, type:806 etharp_update_arp_entry: 192.168.0.211 - c8:d7:19:ee:1f:fc etharp_find_entry: found empty entry 0 etharp_find_entry: no empty entry found and not allowed to recycle etharp_arp_input: incoming ARP request etharp_arp_input: ARP request was not for us. ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:c8:d7:19:ee:1f:fc, type:806 etharp_update_arp_entry: 192.168.0.211 - c8:d7:19:ee:1f:fc etharp_find_entry: found empty entry 0 etharp_find_entry: no empty entry found and not allowed to recycle etharp_arp_input: incoming ARP request etharp_arp_input: ARP request was not for us. ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:c8:d7:19:ee:1f:fc, type:806 etharp_update_arp_entry: 192.168.0.211 - c8:d7:19:ee:1f:fc etharp_find_entry: found empty entry 0 etharp_find_entry: no empty entry found and not allowed to recycle etharp_arp_input: incoming ARP request etharp_arp_input: ARP request was not for us. The reason I originally found it didn't work because I forgot to set the default route in my Linux PPP server. Now we need a more elegant way to fix the problem. Thanks, Charles -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Sylvain Rochet Sent: Thursday, April 10, 2014 3:49 PM To: Mailing list for lwIP users Subject: Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP) Hello Charles, On Thu, Apr 10, 2014 at 06:37:02PM +0000, [email protected] wrote: > Below is more debug information and hope it's helpful for fixing the problem. > > Regarding the code stalled at early stage, that's hardware related. I > am using ARM7 (AT91SAM7 to be specific), so the data alignment is 4 > and PBUF_LINK_HLEN is 14 by default, so I replaced all PBUF_LINK_HLEN > in the patch with (PBUF_LINK_HLEN + 2). It fixed the run-time problem > which keep the code running fine. Now I can build-up the PPP > connection. However, the patch seems fix the pbuf issue but it > actually breaks the traffic from Ethernet to PPP side which was fine > before the patch. If you need me do any test, please let me know. Humm, you should set ETH_PAD_SIZE to 2 in your lwipopts.h instead of doing that. Sylvain _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
