summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkjc <kjc@openbsd.org>2003-05-20 08:58:36 +0000
committerkjc <kjc@openbsd.org>2003-05-20 08:58:36 +0000
commit34466e7d72d1431b166993d1d216aaf5105c6a73 (patch)
treed9d683aa3d57d46f5a9b2ecb5f55c8510648ac71
parentturn on mount_ntfs. i386 only until we know it works somewhere else (diff)
downloadwireguard-openbsd-34466e7d72d1431b166993d1d216aaf5105c6a73.tar.xz
wireguard-openbsd-34466e7d72d1431b166993d1d216aaf5105c6a73.zip
fix a breakage in hfsc.
hif->hif_rootclass should be initialized when the root queue is created.
-rw-r--r--sys/altq/altq_hfsc.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/sys/altq/altq_hfsc.c b/sys/altq/altq_hfsc.c
index 681acf9bfc6..d8e843f671a 100644
--- a/sys/altq/altq_hfsc.c
+++ b/sys/altq/altq_hfsc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_hfsc.c,v 1.18 2003/04/12 20:03:22 henning Exp $ */
+/* $OpenBSD: altq_hfsc.c,v 1.19 2003/05/20 08:58:36 kjc Exp $ */
/* $KAME: altq_hfsc.c,v 1.17 2002/11/29 07:48:33 kjc Exp $ */
/*
@@ -450,16 +450,18 @@ hfsc_class_create(struct hfsc_if *hif, struct service_curve *rsc,
if (flags & HFCF_DEFAULTCLASS)
hif->hif_defaultclass = cl;
- /* add this class to the children list of the parent */
if (parent == NULL) {
/* this is root class */
- }
- else if ((p = parent->cl_children) == NULL)
- parent->cl_children = cl;
- else {
- while (p->cl_siblings != NULL)
- p = p->cl_siblings;
- p->cl_siblings = cl;
+ hif->hif_rootclass = cl;
+ } else {
+ /* add this class to the children list of the parent */
+ if ((p = parent->cl_children) == NULL)
+ parent->cl_children = cl;
+ else {
+ while (p->cl_siblings != NULL)
+ p = p->cl_siblings;
+ p->cl_siblings = cl;
+ }
}
splx(s);