diff options
author | Sean Bruno <sbruno@FreeBSD.org> | 2018-06-24 21:19:08 +0000 |
---|---|---|
committer | Sean Bruno <sbruno@FreeBSD.org> | 2018-06-24 21:19:08 +0000 |
commit | 2d0730b2436c3201e270697c2f6d6be8935f3ac8 (patch) | |
tree | 9be8cf3a14fe2ca38b26632beb48ac4d6a0706f1 /sbin/pfctl | |
parent | 5cc9fabecfab8ab76ace2521372eae00997fe16b (diff) | |
download | src-test-2d0730b2436c3201e270697c2f6d6be8935f3ac8.tar.gz src-test-2d0730b2436c3201e270697c2f6d6be8935f3ac8.zip |
Notes
Diffstat (limited to 'sbin/pfctl')
-rw-r--r-- | sbin/pfctl/pfctl_altq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/pfctl/pfctl_altq.c b/sbin/pfctl/pfctl_altq.c index dafa382d79d97..7b75e87ab6e34 100644 --- a/sbin/pfctl/pfctl_altq.c +++ b/sbin/pfctl/pfctl_altq.c @@ -497,12 +497,13 @@ cbq_compute_idletime(struct pfctl *pf, struct pf_altq *pa) * this causes integer overflow in kernel! * (bandwidth < 6Kbps when max_pkt_size=1500) */ - if (pa->bandwidth != 0 && (pf->opts & PF_OPT_QUIET) == 0) + if (pa->bandwidth != 0 && (pf->opts & PF_OPT_QUIET) == 0) { 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); } |