summaryrefslogtreecommitdiffstats
path: root/sys/netpfil
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2016-10-26 17:34:33 +0000
committerae <ae@FreeBSD.org>2016-10-26 17:34:33 +0000
commit6bc2d2b3d9a4fdf460fe9a38b795839eeb563654 (patch)
treed9c93ed54d613dac7f3b3fe2698ae77be9c86a3a /sys/netpfil
parent2b54e88233a532d32f0a2af466504d3f825594f4 (diff)
downloadFreeBSD-src-6bc2d2b3d9a4fdf460fe9a38b795839eeb563654.zip
FreeBSD-src-6bc2d2b3d9a4fdf460fe9a38b795839eeb563654.tar.gz
MFC r307628:
Fix `ipfw table lookup` handler to return entry value, but not its index.
Diffstat (limited to 'sys/netpfil')
-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 47114ea..0f3673a 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);
OpenPOWER on IntegriCloud