lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] regarding lwip, loopif and ip_route


From: Leon Woestenberg
Subject: Re: [lwip-users] regarding lwip, loopif and ip_route
Date: Tue, 12 Oct 2004 13:11:09 +0200

Hello Jim,

On Tue, 2004-10-12 at 04:38, Jim Buteau wrote:
> I have an application which calls lwip_connect()  to a sockaddr representing
> itself.  When the resultant TCP packet makes it down to etharp_output(), a
> call to etharp_query() results.  The packet is queued while a query goes out
> on this (the interface's own) address.  No one responds and the connect
> attempt times out.
> 
> BTW lwip is configured with an ethernet and a loopback interface.
> 
> I have a few questions which I hope are simple to answer:
> 
> 1- Somewhere down the call stack shouldn't some routine have seen that the
> dest matched the ethernet ipaddr and directed the packet at the loopif?  I
> am tempted to add this capability to ip_route().  On the other hand I can't
> find any precedent for this on lwip-users or anywhere I've searched.
> 
Good point, but I do not think that packets destined for a non-loopback
address are meant to be fed back into the loopback address range.

I.e. suppose your adapter has IP address 192.168.0.1 and you are sending
to it, I do not think the packet should enter the 127.0.0.1 loopback
address.

What we/you could do, is insert it directly into the ip_input() function
of the adapter.

> 2- Should/Could  the arp_table be initialized with its own ip-hw address
> pair so that an initial query is unnecessary?
>
No, I do not think the adapters *own* address is supposed to occur in
the ARP table.

The packet should be intercepted before that (in ip_route() I would
think).

> 3- Is there an implicit assumption that ethernet controllers will loop back
> packets?
> 
No, they will not. 

Regards,

Leon.





reply via email to

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