The branch main has been updated by glebius:

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

commit c1376acb8a9df03e5e47a78dbac5347d036116ff
Author:     Gleb Smirnoff <[email protected]>
AuthorDate: 2026-01-13 18:08:49 +0000
Commit:     Gleb Smirnoff <[email protected]>
CommitDate: 2026-01-13 18:08:49 +0000

    ipfw: find_tentry method is defined for any table algorithm
    
    The error path is never taken.  Also the path was leaking a lock.
    
    Noticed by:     ae
---
 sys/netpfil/ipfw/ip_fw_table.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/sys/netpfil/ipfw/ip_fw_table.c b/sys/netpfil/ipfw/ip_fw_table.c
index da52166f8062..96f550e66e4c 100644
--- a/sys/netpfil/ipfw/ip_fw_table.c
+++ b/sys/netpfil/ipfw/ip_fw_table.c
@@ -1031,7 +1031,6 @@ find_table_entry(struct ip_fw_chain *ch, ip_fw3_opheader 
*op3,
        ipfw_obj_header *oh;
        struct tid_info ti;
        struct table_config *tc;
-       struct table_algo *ta;
        struct table_info *kti;
        struct table_value *pval;
        struct namedobj_instance *ni;
@@ -1060,7 +1059,6 @@ find_table_entry(struct ip_fw_chain *ch, ip_fw3_opheader 
*op3,
        /*
         * Find existing table and check its type .
         */
-       ta = NULL;
        if ((tc = find_table(ni, &ti)) == NULL) {
                IPFW_UH_RUNLOCK(ch);
                return (ESRCH);
@@ -1073,12 +1071,8 @@ find_table_entry(struct ip_fw_chain *ch, ip_fw3_opheader 
*op3,
        }
 
        kti = KIDX_TO_TI(ch, tc->no.kidx);
-       ta = tc->ta;
-
-       if (ta->find_tentry == NULL)
-               return (ENOTSUP);
 
-       error = ta->find_tentry(tc->astate, kti, tent);
+       error = tc->ta->find_tentry(tc->astate, kti, tent);
        if (error == 0) {
                pval = get_table_value(ch, tc, tent->v.kidx);
                ipfw_export_table_value_v1(pval, &tent->v.value);

Reply via email to