Network stack locking question
Ivo Vachkov
ivo.vachkov at gmail.com
Wed Sep 5 10:31:15 PDT 2007
On 9/5/07, Bruce M. Simpson <bms at freebsd.org> wrote:
> You need to remember to drop the lock which rtalloc() acquires on your
> behalf using RTFREE() before leaving the function or possibly calling a
> function which needs exclusive/write access to the rtentry.
>
> If your code needs this rtentry to remain in the system, a call to
> RT_ADDREF() with the lock held may be necessary, although you should
> remember to RT_REMREF() with the lock held when done with the rtentry.
>
> See «net/route.h» for more info.
actually, a simple
bzero(&out_rt, sizeof(struct route_in6));
(i'll test it tonight with just a 'out_rt.ro_rt = NULL;')
fixed the problem.
> regards,
> BMS
>
thanks again for the help.
More information about the freebsd-net
mailing list