diff options
author | Luiz Souza <luiz@netgate.com> | 2017-07-24 11:55:24 -0500 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2017-07-24 11:57:35 -0500 |
commit | de7122ed242adf8c37092407d6ca4b53bd8dee1d (patch) | |
tree | 5fc271e0da39d52d095d008a6df62d64b5bf3866 | |
parent | e2d6352516b06dbdac51f70dbf7bb37f0e7c1855 (diff) | |
download | FreeBSD-src-de7122ed242adf8c37092407d6ca4b53bd8dee1d.zip FreeBSD-src-de7122ed242adf8c37092407d6ca4b53bd8dee1d.tar.gz |
Fix the build, define the boottime variable before use it.
(cherry picked from commit 4ff0e4a77646d70078e5be332359df4967d187f2)
-rw-r--r-- | sys/netpfil/ipfw/ip_fw_table.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_table.c b/sys/netpfil/ipfw/ip_fw_table.c index b3911fa..d4a52b0 100644 --- a/sys/netpfil/ipfw/ip_fw_table.c +++ b/sys/netpfil/ipfw/ip_fw_table.c @@ -1150,6 +1150,7 @@ find_table_entry(struct ip_fw_chain *ch, ip_fw3_opheader *op3, struct table_algo *ta; struct table_info *kti; struct table_value *pval; + struct timeval boottime; struct namedobj_instance *ni; int error; size_t sz; @@ -1198,8 +1199,10 @@ find_table_entry(struct ip_fw_chain *ch, ip_fw3_opheader *op3, if (error == 0) { pval = get_table_value(ch, tc, tent->v.kidx); ipfw_export_table_value_v1(pval, &tent->v.value); - if (tent->timestamp != 0) - tent->timestamp += da->boottime; + if (tent->timestamp != 0) { + getboottime(&boottime); + tent->timestamp += boottime.tv_sec; + } } IPFW_UH_RUNLOCK(ch); |