Re: nd6_lookup() and rt refcount

2015-09-12 Thread Martin Pieuchot
Thanks for your review. On 12/09/15(Sat) 15:30, Alexander Bluhm wrote: > [...] > Do you think it is a good idea to reuse the rt parameter in this > goto spaghetti mess? I looks correct, but I would keep a local > variable for this local route usage. Fine, I kept a local variable. > The

Re: nd6_lookup() and rt refcount

2015-09-12 Thread Alexander Bluhm
On Sat, Sep 12, 2015 at 09:57:23PM +0200, Martin Pieuchot wrote: > Did I miss something else? I did not find anything. OK bluhm@ > @@ -1536,15 +1541,18 @@ struct nd_pfxrouter * > find_pfxlist_reachable_router(struct nd_prefix *pr) > { > struct nd_pfxrouter *pfxrtr; > - struct

nd6_lookup() and rt refcount

2015-09-12 Thread Martin Pieuchot
This diff removes a tricky "rt->rt_refcnt--". It changes the behavior of nd6_lookup() to always return a route entry with a valid reference count. That means that rtfree(9) should be called after nd6_lookup(). There's on hairy case in nd6_output(). This is because of the dance done in

Re: nd6_lookup() and rt refcount

2015-09-12 Thread Alexander Bluhm
On Sat, Sep 12, 2015 at 11:17:54AM +0200, Martin Pieuchot wrote: > I'd like to have careful reviews. I'm running with this for a couple > of months but I doubt I'm exercising all the code paths. > @@ -1677,24 +1677,21 @@ icmp6_redirect_output(struct mbuf *m0, s > > { > /*