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: Enrico Lehmann
Subject: Re: [lwip-devel] ipv6 processing - ip6_input()
Date: Sat, 28 Apr 2012 23:14:49 +0200

Hello Ivan,

thank you for your quick response and your detailed explanation.

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

Get it. This will simplify the process a lot.

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

I think it is necessary to always pass the netif where the adress match 
occured, which is not necessarily the input netif.
For example, the nd6_input() uses the passed netif for address checkings. So if 
the wrong netif is used, this will fail.


> 
> Cheers
> Ivan
> 

Ciao,
Enrico
-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                          
        
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a



reply via email to

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