[Top] [All Lists]

Re: [PATCH][IPV6][NDISC] unify ipv6 output routine

To: YOSHIFUJI Hideaki / ???? <yoshfuji@xxxxxxxxxxxxxx>
Subject: Re: [PATCH][IPV6][NDISC] unify ipv6 output routine
From: Mika Penttilä <mika.penttila@xxxxxxxxxxx>
Date: Sat, 07 Feb 2004 12:41:46 +0200
Cc: kazunori@xxxxxxxxxxxx, davem@xxxxxxxxxx, netdev@xxxxxxxxxxx, usagi-core@xxxxxxxxxxxxxx
In-reply-to: <20040207.192804.29120956.yoshfuji@xxxxxxxxxxxxxx>
References: <4023D6FB.9010909@xxxxxxxxxxx> <20040207.131455.27570445.yoshfuji@xxxxxxxxxxxxxx> <4024A488.60203@xxxxxxxxxxx> <20040207.192804.29120956.yoshfuji@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1

YOSHIFUJI Hideaki / ???? wrote:

In article <4024A488.60203@xxxxxxxxxxx> (at Sat, 07 Feb 2004 10:40:40 +0200), Mika 
Penttilä <mika.penttila@xxxxxxxxxxx> says:

The ip6_output2() resolves and inserts link-layer address appropriately.
If it did, we would have noticed (by conformance test or even by
usual operation). ;-)

ip6_output2() doesn't resolve link-layer addresses. We don't even have a neighbour, in
ndisc_dst_alloc(dev, NULL, ip6_output2); case.

ip6_output2() calls ip6_output_flinish().
ip6_output_finish() calls dst->hh->hh_output() if hh is already built.
Otherwise, dst->neighbour->output() is called and it resolves link-layer address of neighbor.

I think you missed our ndsic_dst_alloc() change.
ndisc_dst_alloc() takes 4 argument:
struct dst_entry *ndisc_dst_alloc(struct net_device *dev, struct neighbour *neigh,
                                    struct in6_addr *addr,
                                    int (*output)(struct sk_buff *));
If neigh is NULL, we do ndisc_get_neigh(dev, addr) to get one.

hmm. where is this ndisc_dst_alloc() change? In the patch it's called with three params, only the output routine is changed :

- dst = ndisc_dst_alloc(dev, NULL, ndisc_output);
+ dst = ndisc_dst_alloc(dev, NULL, ip6_output2);


<Prev in Thread] Current Thread [Next in Thread>