diff options
author | mlaier <mlaier@FreeBSD.org> | 2005-12-20 00:33:33 +0000 |
---|---|---|
committer | mlaier <mlaier@FreeBSD.org> | 2005-12-20 00:33:33 +0000 |
commit | db7366efc14fc08abfd3a2c2ad5b267e8aebca6e (patch) | |
tree | b6f8546400ef450ab7740c26d8e1fd44fa552348 /sys/contrib/pf | |
parent | fc8beb0b3cc142ea9b2716792e1b806334eb318f (diff) | |
download | FreeBSD-src-db7366efc14fc08abfd3a2c2ad5b267e8aebca6e.zip FreeBSD-src-db7366efc14fc08abfd3a2c2ad5b267e8aebca6e.tar.gz |
Move PFSTATE_EXPIRING from sync_flags to a new local_flags. sync_flags has
special handling when zero. This caused no PFSYNC_ACT_DEL message and thus
disfunction of pfflowd and state synchronisation in general.
Discovered by: thompsa
Good catch by: thompsa
MFC after: 7 days
Diffstat (limited to 'sys/contrib/pf')
-rw-r--r-- | sys/contrib/pf/net/pf.c | 4 | ||||
-rw-r--r-- | sys/contrib/pf/net/pfvar.h | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/contrib/pf/net/pf.c b/sys/contrib/pf/net/pf.c index e68fa5d..ccdf55f 100644 --- a/sys/contrib/pf/net/pf.c +++ b/sys/contrib/pf/net/pf.c @@ -1102,9 +1102,9 @@ void pf_purge_expired_state(struct pf_state *cur) { #ifdef __FreeBSD__ - if (cur->sync_flags & PFSTATE_EXPIRING) + if (cur->local_flags & PFSTATE_EXPIRING) return; - cur->sync_flags |= PFSTATE_EXPIRING; + cur->local_flags |= PFSTATE_EXPIRING; #endif if (cur->src.state == PF_TCPS_PROXY_DST) pf_send_tcp(cur->rule.ptr, cur->af, diff --git a/sys/contrib/pf/net/pfvar.h b/sys/contrib/pf/net/pfvar.h index 5fdef85..1282d4f 100644 --- a/sys/contrib/pf/net/pfvar.h +++ b/sys/contrib/pf/net/pfvar.h @@ -791,9 +791,11 @@ struct pf_state { #define PFSTATE_FROMSYNC 0x02 #define PFSTATE_STALE 0x04 #ifdef __FreeBSD__ -#define PFSTATE_EXPIRING 0x10 -#endif + u_int8_t local_flags; +#define PFSTATE_EXPIRING 0x01 +#else u_int8_t pad; +#endif }; TAILQ_HEAD(pf_rulequeue, pf_rule); |