When ALTQ was detached from an interface queue, the function pointers
authorJoerg Sonnenberger <joerg@dragonflybsd.org>
Mon, 4 Apr 2005 17:08:16 +0000 (17:08 +0000)
committerJoerg Sonnenberger <joerg@dragonflybsd.org>
Mon, 4 Apr 2005 17:08:16 +0000 (17:08 +0000)
commitb2f93efef0143e5d235792b7c893c3d1441c04ac
treebd8cd3f4b399b373331f9ce7779334097ea99890
parente8a8f164206e2cf56967b0be116107eff0c993fa
When ALTQ was detached from an interface queue, the function pointers
for enqueue, dequeue and request ops where reset to NULL. That was fine
in the old days when ifq_* checked wether ALTQ is enabled and fell back
to the classic implementation, but now it just deferences a NULL pointer.
Introduce a new function ifq_set_classic, which resets the pointers to
the same values if_attach initially uses and which implements the
classic BSD queueing. Use this in altq_detach and if_attach.

Reported-by: Stefan Krüger <skrueger@meinberlikomm.de>
sys/net/altq/altq_subr.c
sys/net/if.c
sys/net/ifq_var.h