aboutsummaryrefslogtreecommitdiff
path: root/sbin/ipfw
diff options
context:
space:
mode:
authorDavid Malone <dwmalone@FreeBSD.org>2006-08-23 14:29:18 +0000
committerDavid Malone <dwmalone@FreeBSD.org>2006-08-23 14:29:18 +0000
commitcb0bfd9b89e2ffb9e77738a27aedf5c08c8f3781 (patch)
tree15ab253d3e6882f7e286d9f864c94c9d0490a4b0 /sbin/ipfw
parent9d26d008ac9e1a3d3b2f1d13bbb4a02a5e380746 (diff)
downloadsrc-cb0bfd9b89e2ffb9e77738a27aedf5c08c8f3781.tar.gz
src-cb0bfd9b89e2ffb9e77738a27aedf5c08c8f3781.zip
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
Notes
Notes: svn path=/head/; revision=161550
Diffstat (limited to 'sbin/ipfw')
-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 26ffb42b0e69..00c38002f07e 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)