aboutsummaryrefslogtreecommitdiff
path: root/sys/netpfil/ipfw
diff options
context:
space:
mode:
authorAndrey V. Elsukov <ae@FreeBSD.org>2016-10-19 11:51:17 +0000
committerAndrey V. Elsukov <ae@FreeBSD.org>2016-10-19 11:51:17 +0000
commit308f2c6d56570f78711ffc71625c14340418a668 (patch)
tree6015c57277416f12dcb7f6e5b55bc3ef5f772409 /sys/netpfil/ipfw
parent895219834e0b8d70a1541216f74f8582be03a13b (diff)
downloadsrc-308f2c6d56570f78711ffc71625c14340418a668.tar.gz
src-308f2c6d56570f78711ffc71625c14340418a668.zip
Fix `ipfw table lookup` handler to return entry value, but not its index.
Submitted by: loos MFC after: 1 week
Notes
Notes: svn path=/head/; revision=307628
Diffstat (limited to 'sys/netpfil/ipfw')
-rw-r--r--sys/netpfil/ipfw/ip_fw_table.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_table.c b/sys/netpfil/ipfw/ip_fw_table.c
index 84a13fa5dff7..8f55ccf8f15e 100644
--- a/sys/netpfil/ipfw/ip_fw_table.c
+++ b/sys/netpfil/ipfw/ip_fw_table.c
@@ -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);