diff options
author | 2002-05-31 09:46:12 +0000 | |
---|---|---|
committer | 2002-05-31 09:46:12 +0000 | |
commit | 14bdcc01772d715b9680210852e1cbf61a9c4426 (patch) | |
tree | 327fc70539615ecc0019f6fdc514c10438a7739b | |
parent | define ALTQ_NOPCC if i386 and !I586_CPU and !I686_CPU. (diff) | |
download | wireguard-openbsd-14bdcc01772d715b9680210852e1cbf61a9c4426.tar.xz wireguard-openbsd-14bdcc01772d715b9680210852e1cbf61a9c4426.zip |
fail if the default class is smaller than the ctl class.
report by Paul Civati <paul@xciv.org>
-rw-r--r-- | usr.sbin/altq/libaltq/qop_cbq.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/altq/libaltq/qop_cbq.c b/usr.sbin/altq/libaltq/qop_cbq.c index 3eb7438f7dc..f0e77d189f2 100644 --- a/usr.sbin/altq/libaltq/qop_cbq.c +++ b/usr.sbin/altq/libaltq/qop_cbq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qop_cbq.c,v 1.3 2001/12/03 08:38:48 kjc Exp $ */ +/* $OpenBSD: qop_cbq.c,v 1.4 2002/05/31 09:46:12 kjc Exp $ */ /* $KAME: qop_cbq.c,v 1.5 2001/08/16 10:39:14 kjc Exp $ */ /* * Copyright (c) Sun Microsystems, Inc. 1993-1998 All rights reserved. @@ -342,6 +342,9 @@ qcmd_cbq_add_class(const char *ifname, const char *class_name, /* reserve bandwidth for ctl_class */ ctl_bandwidth = ifinfo->bandwidth / 100 * CTL_PBANDWIDTH; + if (bandwidth <= ctl_bandwidth) + LOG(LOG_ERR, 0, + "bandwidth for default class too small!"); bandwidth -= ctl_bandwidth; } } |