diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pf_lb.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/net/pf_lb.c b/sys/net/pf_lb.c index 0ddc950e9f6..b826f6a3556 100644 --- a/sys/net/pf_lb.c +++ b/sys/net/pf_lb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_lb.c,v 1.2 2009/02/12 02:13:15 sthen Exp $ */ +/* $OpenBSD: pf_lb.c,v 1.3 2009/02/18 20:06:23 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -678,6 +678,16 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, int direction, default: return (NULL); } + /* + * Translation was a NOP. + * Pretend there was no match. + */ + if (!bcmp(*skp, *nkp, sizeof(struct pf_state_key_cmp))) { + pool_put(&pf_state_key_pl, *nkp); + pool_put(&pf_state_key_pl, *skp); + *skw = *sks = *nkp = *skp = NULL; + return (NULL); + } } return (r); |