summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2003-01-24 11:37:24 +0000
committerhenning <henning@openbsd.org>2003-01-24 11:37:24 +0000
commit98e5c3137b75bca3abed742f15b71ce01a316958 (patch)
treeed8d9bc8cf9451f3b8c74de6d194e89ca076836b
parentFix wscale support, the first version didn't really work right. (diff)
downloadwireguard-openbsd-98e5c3137b75bca3abed742f15b71ce01a316958.tar.xz
wireguard-openbsd-98e5c3137b75bca3abed742f15b71ce01a316958.zip
make rate2str include the unit in the ouput even if it is 0b. was irrelevant
before as you cannot specify "bandwidth 0b" on a rule; now that rate2str is used for the stats output it does matter.
-rw-r--r--sbin/pfctl/pfctl_altq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl_altq.c b/sbin/pfctl/pfctl_altq.c
index 0bc05f461c8..1a52a9d6c53 100644
--- a/sbin/pfctl/pfctl_altq.c
+++ b/sbin/pfctl/pfctl_altq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_altq.c,v 1.35 2003/01/24 10:53:32 henning Exp $ */
+/* $OpenBSD: pfctl_altq.c,v 1.36 2003/01/24 11:37:24 henning Exp $ */
/*
* Copyright (C) 2002
@@ -1019,7 +1019,7 @@ rate2str(double rate)
idx = 0;
if (rate == 0.0)
- snprintf(buf, RATESTR_MAX, "0");
+ snprintf(buf, RATESTR_MAX, "0b");
else if (rate >= 1000 * 1000 * 1000)
snprintf(buf, RATESTR_MAX, "%.2fGb",
rate / (1000.0 * 1000.0 * 1000.0));