Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Sep 2007 20:30:59 +0300
From:      "Ivo Vachkov" <ivo.vachkov@gmail.com>
To:        freebsd-net <freebsd-net@freebsd.org>
Subject:   Re: Network stack locking question
Message-ID:  <f85d6aa70709051030o68607c9aoc4454efee56049e6@mail.gmail.com>
In-Reply-To: <46DEC668.50509@FreeBSD.org>
References:  <f85d6aa70709040234w3abc3e05n9cf9c9d86cb994cd@mail.gmail.com> <46DD2A1E.3060109@FreeBSD.org> <f85d6aa70709050216j72d8d2f4qce46e65e675a8ee3@mail.gmail.com> <46DEC668.50509@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9/5/07, Bruce M. Simpson <bms@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 =ABnet/route.h=BB 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 =3D NULL;')

fixed the problem.

> regards,
> BMS
>

thanks again for the help.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f85d6aa70709051030o68607c9aoc4454efee56049e6>