lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] ipv6 processing - ip6_input()


From: Ivan Delamer
Subject: Re: [lwip-devel] ipv6 processing - ip6_input()
Date: Fri, 27 Apr 2012 10:34:55 -0600 (MDT)
User-agent: SquirrelMail/1.4.9a

Hello Enrico,

Thank you for your interest in LwIP and IPv6. I'll split the answer into
one email per question, so that the split conversation is easier to
follow.


> Let me ask you, especially Ivan, something about your ip6_input()
> implementation.
> If any message is received, you check for proper IPv6 header and than
> check if destination address is a kind of multicast or unicast address. If
> it is a unicast address, you check all available network interfaces
> (netif's) if the destination address is configured as one of it's
> addresses. But is this not a kind of gateway behaviour?
>
> On a 'normal' host wouldn't you just check your input netif if destination
> address matches? For example you have two netif's and a data packet is
> targeted to the second netif, which is not the input netif, the packet is
> processed by e.g. the UDP input function but with the wrong netif.
> Shouldn't the incoming netif not be replaced by the previous selected
> netif (the netif where the destination address match occurs)?
>
> I see two possibilities:
> 1.) Keep that kind of gateway behaviour (which I like, since I need that
> one), but then the input netif 'inp' must be replaced by the matching
> netif 'netif'.
> 2.) Only match the destination address with configured addresses of the
> input netif 'inp'.
>
> Maybe I missed something and it behaves quite different, but then,
> perhaps, you can enlighten me :-)
>

You are right that this is a kind of gateway/router behaviour. It is
copied from the ip4_input() function. Maybe someone else has some insight
into why it was originally implemented this way.

The way I see it is that it facilitates routing when we have 2+ netifs, as
we don't have to go through a router phase, we can just accept the packet
if it is for us without sending to 2nd netif and then accepting it there.

I will look into whether it makes sense to pass on the input netif or
accept netif to ucp/tcp layers.

Cheers
Ivan





reply via email to

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