aboutsummaryrefslogtreecommitdiff
path: root/sbin/ipfw
diff options
context:
space:
mode:
authorAndrey V. Elsukov <ae@FreeBSD.org>2017-05-02 05:02:12 +0000
committerAndrey V. Elsukov <ae@FreeBSD.org>2017-05-02 05:02:12 +0000
commite028ccdad82ec3dfdd10f17ccef10e568f9c3b2b (patch)
tree53b92d24c5ff4a3f952bad5a0038c5241337e473 /sbin/ipfw
parent945fc991b2dc3385fb2a91cd0189b074ca1fad63 (diff)
Notes
Diffstat (limited to 'sbin/ipfw')
-rw-r--r--sbin/ipfw/tables.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sbin/ipfw/tables.c b/sbin/ipfw/tables.c
index 6f41de337c056..ede93f4fa9c89 100644
--- a/sbin/ipfw/tables.c
+++ b/sbin/ipfw/tables.c
@@ -1628,18 +1628,19 @@ tables_foreach(table_cb_t *f, void *arg, int sort)
}
if (sort != 0)
- qsort(olh + 1, olh->count, olh->objsize, tablename_cmp);
+ qsort(olh + 1, olh->count, olh->objsize,
+ tablename_cmp);
info = (ipfw_xtable_info *)(olh + 1);
for (i = 0; i < olh->count; i++) {
- error = f(info, arg); /* Ignore errors for now */
- info = (ipfw_xtable_info *)((caddr_t)info + olh->objsize);
+ if (co.use_set == 0 || info->set == co.use_set - 1)
+ error = f(info, arg);
+ info = (ipfw_xtable_info *)((caddr_t)info +
+ olh->objsize);
}
-
free(olh);
break;
}
-
return (0);
}