summaryrefslogtreecommitdiff
path: root/sbin/pfctl/pfctl_altq.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-04-05 21:44:47 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-04-05 21:44:47 +0000
commit8600f783b20ec65384a2030322218e128bb30ef2 (patch)
tree21591b2d848acb919fb81ce390dad8d1fe7cdfd0 /sbin/pfctl/pfctl_altq.c
parent8028ebca95530ef0b179a1d9b6b25aff46dffc7a (diff)
allow queue specs to be limited to certain interfaces.
altq on { $if0 $if1 $if2 $if3 } priq bandwidth 10Mb queue { one two } queue one priority 1 priq(default) queue two on $if0 priority 15 queue two on ! $if0 priority 0 ok dhartmei@
Diffstat (limited to 'sbin/pfctl/pfctl_altq.c')
-rw-r--r--sbin/pfctl/pfctl_altq.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/pfctl/pfctl_altq.c b/sbin/pfctl/pfctl_altq.c
index 0040f872893..6f30ef3bd70 100644
--- a/sbin/pfctl/pfctl_altq.c
+++ b/sbin/pfctl/pfctl_altq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_altq.c,v 1.49 2003/04/03 14:41:46 henning Exp $ */
+/* $OpenBSD: pfctl_altq.c,v 1.50 2003/04/05 21:44:46 henning Exp $ */
/*
* Copyright (C) 2002
@@ -171,7 +171,7 @@ void
print_altq(const struct pf_altq *a, unsigned level, u_int16_t bwpercent)
{
if (a->qname[0] != NULL) {
- print_queue(a, level, bwpercent);
+ print_queue(a, level, bwpercent, 0);
return;
}
@@ -206,7 +206,8 @@ print_altq(const struct pf_altq *a, unsigned level, u_int16_t bwpercent)
}
void
-print_queue(const struct pf_altq *a, unsigned level, u_int16_t bwpercent)
+print_queue(const struct pf_altq *a, unsigned level, u_int16_t bwpercent,
+ int print_interface)
{
unsigned i;
@@ -214,6 +215,8 @@ print_queue(const struct pf_altq *a, unsigned level, u_int16_t bwpercent)
for (i = 0; i < level; ++i)
printf(" ");
printf("%s ", a->qname);
+ if (print_interface)
+ printf("on %s ", a->ifname);
if (a->scheduler == ALTQT_CBQ || a->scheduler == ALTQT_HFSC) {
if (bwpercent > 0) {
if (bwpercent < 100)