git: 517614273258 - stable/15 - ipfilter ippool: Flag deleted entries with "#"

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Thu, 09 Oct 2025 12:36:26 UTC
The branch stable/15 has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=51761427325828f6b0261468a30addc22abd9a2b

commit 51761427325828f6b0261468a30addc22abd9a2b
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-11-02 05:28:19 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2025-10-09 12:36:19 +0000

    ipfilter ippool: Flag deleted entries with "#"
    
    List deleted entries prefixed by "#". This is consistent with other
    ippool list functions.
    
    Fixes:          7531c434a593
    
    (cherry picked from commit 94758e72fdbd6b218e79884e22347eb357a7e51d)
---
 sbin/ipf/libipf/printpooldata.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sbin/ipf/libipf/printpooldata.c b/sbin/ipf/libipf/printpooldata.c
index bd5af316eb19..b203522734be 100644
--- a/sbin/ipf/libipf/printpooldata.c
+++ b/sbin/ipf/libipf/printpooldata.c
@@ -13,6 +13,8 @@ printpooldata(ip_pool_t *pool, int opts)
 {
 
 	if (opts & OPT_SAVEOUT) {
+		if ((pool->ipo_flags & IPOOL_DELETE) != 0)
+			PRINTF("# ");
 		PRINTF("pool ");
 	} else if ((opts & OPT_DEBUG) == 0) {
 		if ((pool->ipo_flags & IPOOL_ANON) != 0)