diff options
| author | Gleb Smirnoff <glebius@FreeBSD.org> | 2026-01-13 18:08:49 +0000 |
|---|---|---|
| committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2026-01-13 18:08:49 +0000 |
| commit | c1376acb8a9df03e5e47a78dbac5347d036116ff (patch) | |
| tree | 601b5411528d75f8aeaae1d3de0969fc3f29ec72 | |
| parent | 66eedcb0224df03e56513f3caf1df93a52b6a919 (diff) | |
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
| -rw-r--r-- | sys/netpfil/ipfw/ip_fw_table.c | 8 |
1 files changed, 1 insertions, 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); |
