From c65dbd2c58f0596248a919895ab0f32db25e1bf8 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Tue, 10 Jun 2008 19:32:15 +0000 Subject: save somespace in the state by collapsing two 8 bit ints used as booleans into one 8 bit flags field. shrinks the state structure by 4 bytes on 32bit archs ryan ok --- sys/net/if_pfsync.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sys/net/if_pfsync.c') diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c index af4f0f8bb3c..6220e8e2343 100644 --- a/sys/net/if_pfsync.c +++ b/sys/net/if_pfsync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.94 2008/06/10 04:24:17 henning Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.95 2008/06/10 19:32:13 henning Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -343,8 +343,7 @@ pfsync_insert_net_state(struct pfsync_state *sp, u_int8_t chksum_flag) st->direction = sp->direction; st->log = sp->log; st->timeout = sp->timeout; - st->allow_opts = sp->allow_opts; - st->sloppy = sp->sloppy; + st->state_flags = sp->state_flags; bcopy(sp->id, &st->id, sizeof(st->id)); st->creatorid = sp->creatorid; @@ -1262,8 +1261,7 @@ pfsync_pack_state(u_int8_t action, struct pf_state *st, int flags) sp->proto = sk->proto; sp->direction = st->direction; sp->log = st->log; - sp->allow_opts = st->allow_opts; - sp->sloppy = st->sloppy; + sp->state_flags = st->state_flags; sp->timeout = st->timeout; if (flags & PFSYNC_FLAG_STALE) -- cgit v1.2.3