diff options
author | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2004-12-13 01:47:27 +0000 |
---|---|---|
committer | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2004-12-13 01:47:27 +0000 |
commit | 4aeffaa1a581000c23d516d4d226c5f2a436a3fa (patch) | |
tree | fb02b47e192556f1336a4494d09d253047ce9306 /sys/net | |
parent | ce7bc7b1be098af7cf72698d7043cd6107f09704 (diff) |
Set creation timestamps correctly on states learnt by pfsync that are
more than a second old.
ok mcbride@ henning@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_pfsync.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c index 9010da00836..330fabed15c 100644 --- a/sys/net/if_pfsync.c +++ b/sys/net/if_pfsync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.40 2004/12/06 10:27:53 mpf Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.41 2004/12/13 01:47:26 pascoe Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -211,7 +211,7 @@ pfsync_insert_net_state(struct pfsync_state *sp) pf_state_peer_ntoh(&sp->dst, &st->dst); bcopy(&sp->rt_addr, &st->rt_addr, sizeof(st->rt_addr)); - st->creation = ntohl(sp->creation) + time_second; + st->creation = time_second - ntohl(sp->creation); st->expire = ntohl(sp->expire) + time_second; st->af = sp->af; |