Fix ipfw table lookup
handler to return entry value, but not its index.
Submitted by: loos MFC after: 1 week
This commit is contained in:
parent
895219834e
commit
308f2c6d56
@ -1087,6 +1087,7 @@ find_table_entry(struct ip_fw_chain *ch, ip_fw3_opheader *op3,
|
||||
struct table_config *tc;
|
||||
struct table_algo *ta;
|
||||
struct table_info *kti;
|
||||
struct table_value *pval;
|
||||
struct namedobj_instance *ni;
|
||||
int error;
|
||||
size_t sz;
|
||||
@ -1132,7 +1133,10 @@ find_table_entry(struct ip_fw_chain *ch, ip_fw3_opheader *op3,
|
||||
return (ENOTSUP);
|
||||
|
||||
error = 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);
|
||||
}
|
||||
IPFW_UH_RUNLOCK(ch);
|
||||
|
||||
return (error);
|
||||
|
Loading…
x
Reference in New Issue
Block a user