The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=b405250c77e6841a8159a4081d4e0f61e49dfbf8
commit b405250c77e6841a8159a4081d4e0f61e49dfbf8 Author: Andrey V. Elsukov <a...@freebsd.org> AuthorDate: 2025-03-05 09:29:22 +0000 Commit: Andrey V. Elsukov <a...@freebsd.org> CommitDate: 2025-03-05 09:29:22 +0000 ipfw: fix dump_soptcodes() handler Use correct indent number to dump registered socket options. It is not currently in use but can be used for debugging. PR: 283970 MFC after: 1 week --- sys/netpfil/ipfw/ip_fw_sockopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfw/ip_fw_sockopt.c b/sys/netpfil/ipfw/ip_fw_sockopt.c index 907baafd878d..19f5fff2749a 100644 --- a/sys/netpfil/ipfw/ip_fw_sockopt.c +++ b/sys/netpfil/ipfw/ip_fw_sockopt.c @@ -2555,7 +2555,7 @@ dump_soptcodes(struct ip_fw_chain *chain, ip_fw3_opheader *op3, } olh->size = size; - for (n = 1; n <= count; n++) { + for (n = 0; n < count; n++) { i = (ipfw_sopt_info *)ipfw_get_sopt_space(sd, sizeof(*i)); KASSERT(i != NULL, ("previously checked buffer is not enough")); sh = &ctl3_handlers[n];