diff options
author | Luiz Otavio O Souza <luiz@netgate.com> | 2016-02-17 08:39:57 -0600 |
---|---|---|
committer | Luiz Otavio O Souza <luiz@netgate.com> | 2016-02-17 08:46:26 -0600 |
commit | 413cef1028ae431e2f2d4fbb024d0a3a15a41c41 (patch) | |
tree | d11fdd0834e497b0584e4141608a6d82c0bfba85 /sbin | |
parent | eea87801dfdf1b51cc56159a1b1eb69109b7c9e7 (diff) | |
download | FreeBSD-src-413cef1028ae431e2f2d4fbb024d0a3a15a41c41.zip FreeBSD-src-413cef1028ae431e2f2d4fbb024d0a3a15a41c41.tar.gz |
Revert "Importing pfSense patch pfaltq_interface_bw.diff"
This reverts commit 9b3c3fc58b6b3162259b33fc56746f42a48e0301.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/pfctl/pfctl_altq.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sbin/pfctl/pfctl_altq.c b/sbin/pfctl/pfctl_altq.c index 716df09..6c33bf7 100644 --- a/sbin/pfctl/pfctl_altq.c +++ b/sbin/pfctl/pfctl_altq.c @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include <errno.h> #include <limits.h> #include <math.h> -#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -265,11 +264,15 @@ eval_pfaltq(struct pfctl *pf, struct pf_altq *pa, struct node_queue_bw *bw, pa->ifbandwidth = bw->bw_absolute; else #ifdef __FreeBSD__ - rate = getifspeed(pf->dev, pa->ifname); - if (rate == 0) - rate = IF_Mbps(100); + if ((rate = getifspeed(pf->dev, pa->ifname)) == 0) { +#else + if ((rate = getifspeed(pa->ifname)) == 0) { #endif - if ((pa->ifbandwidth = eval_bwspec(bw, rate)) == 0) + fprintf(stderr, "interface %s does not know its bandwidth, " + "please specify an absolute bandwidth\n", + pa->ifname); + errors++; + } else if ((pa->ifbandwidth = eval_bwspec(bw, rate)) == 0) pa->ifbandwidth = rate; errors += eval_queue_opts(pa, opts, pa->ifbandwidth); |