diff options
author | pjd <pjd@FreeBSD.org> | 2004-08-23 19:20:27 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2004-08-23 19:20:27 +0000 |
commit | aa05ee70bcf2fc0e6538044e9a4de14d587d761d (patch) | |
tree | 7e5d5c5c577b64c0fa34357731e73d58540ef10c /sbin/ipfw | |
parent | 23928ffbb65a186dfb07772ede9f6d218f7bd800 (diff) | |
download | FreeBSD-src-aa05ee70bcf2fc0e6538044e9a4de14d587d761d.zip FreeBSD-src-aa05ee70bcf2fc0e6538044e9a4de14d587d761d.tar.gz |
Fix 'show' command for pipes and queues.
PR: bin/70311
Submitted by: Pawel Malachowski <pawmal-posting@freebsd.lublin.pl>
MFC after: 3 days
Diffstat (limited to 'sbin/ipfw')
-rw-r--r-- | sbin/ipfw/ipfw2.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index bac3552..19223c4 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -1530,7 +1530,7 @@ list_pipes(void *data, uint nbytes, int ac, char *av[]) next = (char *)p + l; nbytes -= l; - if (rulenum != 0 && rulenum != p->pipe_nr) + if ((rulenum != 0 && rulenum != p->pipe_nr) || do_pipe == 2) continue; /* @@ -1564,6 +1564,12 @@ list_pipes(void *data, uint nbytes, int ac, char *av[]) l = sizeof(*fs) + fs->rq_elements * sizeof(*q); next = (char *)fs + l; nbytes -= l; + + if (rulenum != 0 && ((rulenum != fs->fs_nr && do_pipe == 2) || + (rulenum != fs->parent_nr && do_pipe == 1))) { + continue; + } + q = (struct dn_flow_queue *)(fs+1); sprintf(prefix, "q%05d: weight %d pipe %d ", fs->fs_nr, fs->weight, fs->parent_nr); |