Skip to content

Commit eee36ff

Browse files
committed
ipfilter/ippool: Dump a copy of ippool dstlist data in "new" format
As with 7531c43, which dumped ippool table data in the "new" format, print dstlist data in the "new" format. MFC after: 1 week
1 parent 2f30b43 commit eee36ff

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

sbin/ipf/libipf/printdstl_live.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ printdstl_live( ippool_dst_t *d, int fd, char *name, int opts,
4040
if ((d->ipld_flags & IPHASH_DELETE) != 0)
4141
PRINTF("# ");
4242

43+
if (opts & OPT_SAVEOUT)
44+
PRINTF("{\n");
45+
4346
if ((opts & OPT_DEBUG) == 0)
4447
PRINTF("\t{");
4548

sbin/ipf/libipf/printdstlist.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ printdstlist( ippool_dst_t *pp, copyfunc_t copyfunc, char *name, int opts,
4242
return (NULL);
4343
}
4444

45+
if (opts & OPT_SAVEOUT)
46+
PRINTF("\t");
4547
node = printdstlistnode(n, bcopywrap, opts, fields);
4648

4749
free(n);

sbin/ipf/libipf/printdstlistdata.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
void
1212
printdstlistdata( ippool_dst_t *pool, int opts)
1313
{
14-
15-
if ((opts & OPT_DEBUG) == 0) {
14+
if ((opts & OPT_DEBUG) == 0 || opts & OPT_SAVEOUT) {
1615
if ((pool->ipld_flags & IPDST_DELETE) != 0)
1716
PRINTF("# ");
1817
PRINTF("pool ");
@@ -24,7 +23,7 @@ printdstlistdata( ippool_dst_t *pool, int opts)
2423

2524
printunit(pool->ipld_unit);
2625

27-
if ((opts & OPT_DEBUG) == 0) {
26+
if ((opts & OPT_DEBUG) == 0 || opts & OPT_SAVEOUT) {
2827
PRINTF("/dstlist (name %s;", pool->ipld_name);
2928
if (pool->ipld_policy != IPLDP_NONE) {
3029
PRINTF(" policy ");

0 commit comments

Comments
 (0)