diff options
| author | 2011-11-25 12:52:10 +0000 | |
|---|---|---|
| committer | 2011-11-25 12:52:10 +0000 | |
| commit | 59f6b0159d3ee9f0014ffd7e131e245a96073247 (patch) | |
| tree | 60cd0d4a1b3e3f6cb899101861ce1a962280d9c7 /sys/net/if_pflow.c | |
| parent | show-size/show-fake-size (diff) | |
| download | wireguard-openbsd-59f6b0159d3ee9f0014ffd7e131e245a96073247.tar.xz wireguard-openbsd-59f6b0159d3ee9f0014ffd7e131e245a96073247.zip | |
use time_uptime to set state creation values as time_second can be
skewed at runtime by things like date(1) and ntpd. time_uptime is
monotonic and therefore more useful to compare against.
ok deraadt@ mikeb@
Diffstat (limited to 'sys/net/if_pflow.c')
| -rw-r--r-- | sys/net/if_pflow.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_pflow.c b/sys/net/if_pflow.c index 89c39106fb7..9524609c18d 100644 --- a/sys/net/if_pflow.c +++ b/sys/net/if_pflow.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflow.c,v 1.17 2011/07/09 04:11:15 dhill Exp $ */ +/* $OpenBSD: if_pflow.c,v 1.18 2011/11/25 12:52:10 dlg Exp $ */ /* * Copyright (c) 2008 Henning Brauer <henning@openbsd.org> @@ -359,7 +359,7 @@ copy_flow_data(struct pflow_flow *flow1, struct pflow_flow *flow2, flow2->flow_octets = htonl(st->bytes[1]); flow1->flow_start = flow2->flow_start = - htonl((st->creation - (time_second - time_uptime)) * 1000); + htonl(st->creation * 1000); flow1->flow_finish = flow2->flow_finish = htonl((time_uptime - (st->rule.ptr->timeout[st->timeout] ? st->rule.ptr->timeout[st->timeout] : |
