DragonFly bugs List (threaded) for 2010-12
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: panic on detroying tap device
On Mon, Nov 22, 2010 at 12:56 AM, Jan Lentfer <Jan.Lentfer@web.de> wrote:
> When playing with vkernel and networking a encountered a panic when doing
>
> ifconfig tap4 down
> ifconfig tap4 destroy
If the tap(4) is open(2)ed by vkernel, it should bypasses all cloning operation.
Your probably should add one more if_clone method besides
if_clone_creat/if_clone_destroy, like if_clone_iscloned, to fix all
pseudo devices, which support open(2) and if_clone. Then change code
in net/if_clone.c like following:
int
if_clone_destroy()
{
....
ifp = ifunit(name);
if (ifp == NULL)
return (ENXIO);
if (!ifc->ifc_iscloned(ifp))
return EOPNOTSUPP;
if (ifc->ifc_destroy == NULL)
return (EOPNOTSUPP);
....
}
BTW, after all these the TAP_CLONE test in tap_clone_destroy()
probably should be changed to assertion.
Best Regards,
sephe
--
Tomorrow Will Never Die
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]