summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-03-08 14:40:04 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-03-08 14:40:04 +0000
commit7511fff6b92b981f80f2d05d55539dfd466b7e5b (patch)
treeb5adc114f857c97055bf8b2c1ea2f79389cf9c25 /sbin
parent455ab3286f1442e01189ba47bc8047735b6ee014 (diff)
when complaining about a queue's abndwidth beeing to small (below the
resolution we can handle), don't say it must be >6KB, the value actually depends on quite some factors, including interface MTU. Instead, calculate the real minimum value and show that. mpech@ did a good job in bugging me to fix that ;-) ok pb@ dhartmei@ cedric@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/pfctl/pfctl_altq.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl_altq.c b/sbin/pfctl/pfctl_altq.c
index a662b8c50d2..19049ee642d 100644
--- a/sbin/pfctl/pfctl_altq.c
+++ b/sbin/pfctl/pfctl_altq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_altq.c,v 1.42 2003/03/06 12:50:40 henning Exp $ */
+/* $OpenBSD: pfctl_altq.c,v 1.43 2003/03/08 14:40:03 henning Exp $ */
/*
* Copyright (C) 2002
@@ -436,7 +436,9 @@ cbq_compute_idletime(struct pfctl *pf, struct pf_altq *pa)
* (bandwidth < 6Kbps when max_pkt_size=1500)
*/
if (pa->bandwidth != 0 && (pf->opts & PF_OPT_QUIET) == 0)
- warnx("queue bandwidth must be larger than 6Kb");
+ warnx("queue bandwidth must be larger than %s",
+ rate2str(ifnsPerByte * (double)opts->maxpktsize /
+ (double)INT_MAX * (double)pa->ifbandwidth));
fprintf(stderr, "cbq: queue %s is too slow!\n",
pa->qname);
nsPerByte = (double)(INT_MAX / opts->maxpktsize);