Subject: Re: gif and gre recursion
To: None <itojun@iijlab.net>
From: Darren Reed <darrenr@reed.wattle.id.au>
List: tech-net
Date: 05/22/2002 20:57:04
In some email I received from itojun@iijlab.net, sie wrote:
> > - gif does not pre-allocate a route (!)
> 
> 	see in_gif_output().  it caches the route in sc->gif_ro.
> 
> 	one problem is, it does not re-allocate route even if underlying
> 	routing table changes... latest kame code have some timer trick,
> 	but i'm not sure if it is the right way.
> 
> >   and arbitrarily limits recursion
> >   with a single static counter. This seems to work effectively given the
> >   non-reentrancy of this kernel path, and is XXX'd.
> 
> 	another way to detect infinite loop is to use m->m_aux and have a
> 	list of interface it have gone through, but it seemed overkill to us.

Can you think of a better solution that doesn't impose some other
arbitrary limit ?  Using m_aux or something else like that isn't
such a bad idea to me.