summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2006-08-23 14:29:18 +0000
committerdwmalone <dwmalone@FreeBSD.org>2006-08-23 14:29:18 +0000
commite0dfe3d7df89c3c52e58a630308eaf7fac6c3377 (patch)
tree15ab253d3e6882f7e286d9f864c94c9d0490a4b0 /sbin
parent557b37c8dbf57f4a72010f1138fbde44910c5267 (diff)
downloadFreeBSD-src-e0dfe3d7df89c3c52e58a630308eaf7fac6c3377.zip
FreeBSD-src-e0dfe3d7df89c3c52e58a630308eaf7fac6c3377.tar.gz
A pipe bandwidth of 10MBits/s should probably
be understood as 10Mbits/s not 10MBytes/s. Submitted by: Gavin McCullagh <gavin.mccullagh@nuim.ie> MFC after: 1 week
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipfw/ipfw2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 26ffb42..00c3800 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -3424,7 +3424,8 @@ end_mask:
end++;
p.bandwidth *= 1000000;
}
- if (*end == 'B' ||
+ if ((*end == 'B' &&
+ _substrcmp2(end, "Bi", "Bit/s") != 0) ||
_substrcmp2(end, "by", "bytes") == 0)
p.bandwidth *= 8;
if (p.bandwidth < 0)
OpenPOWER on IntegriCloud