diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2008-06-11 17:52:38 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2008-06-11 17:52:38 +0000 |
commit | 19e226c7adfa043673d679b06d0c40f7a03ae1c3 (patch) | |
tree | 1eff5e33a4869a554043b404726154e734af536d /sys/net | |
parent | f6d7b0e0fbd02a189783cf13fbf3c39f0ca11bfe (diff) |
when we establish the mapping from a state key, do it both ways, aka
key1->reverse = key2; and key2->reverse = key1;
ok ryan
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/pf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index a47c9e3ffd2..6a1426a7b7f 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.595 2008/06/11 04:04:19 henning Exp $ */ +/* $OpenBSD: pf.c,v 1.596 2008/06/11 17:52:37 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -885,9 +885,11 @@ pf_find_state(struct pfi_kif *kif, struct pf_state_key_cmp *key, u_int dir, if ((sk = RB_FIND(pf_state_tree, &pf_statetbl, (struct pf_state_key *)key)) == NULL) return (NULL); - if (m->m_pkthdr.pf.statekey) + if (m->m_pkthdr.pf.statekey) { ((struct pf_state_key *) m->m_pkthdr.pf.statekey)->reverse = sk; + sk->reverse = m->m_pkthdr.pf.statekey; + } } if (dir == PF_OUT) |