From cb0bfd9b89e2ffb9e77738a27aedf5c08c8f3781 Mon Sep 17 00:00:00 2001 From: David Malone Date: Wed, 23 Aug 2006 14:29:18 +0000 Subject: [PATCH] A pipe bandwidth of 10MBits/s should probably be understood as 10Mbits/s not 10MBytes/s. Submitted by: Gavin McCullagh MFC after: 1 week --- sbin/ipfw/ipfw2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 @@ config_pipe(int ac, char **av) 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)