summaryrefslogtreecommitdiffstats
path: root/sys/contrib/pf
diff options
context:
space:
mode:
authordhartmei <dhartmei@FreeBSD.org>2005-01-20 18:07:35 +0000
committerdhartmei <dhartmei@FreeBSD.org>2005-01-20 18:07:35 +0000
commit77598c300e31cbc12107d0ddede6eccb3298afd9 (patch)
tree4c0c6aa22cbd2ba8540cbecaed73c5d53d15b8a4 /sys/contrib/pf
parent5d98a96208502ed6bd1fae83446e97ce12604430 (diff)
downloadFreeBSD-src-77598c300e31cbc12107d0ddede6eccb3298afd9.zip
FreeBSD-src-77598c300e31cbc12107d0ddede6eccb3298afd9.tar.gz
Use the packet's address family instead of the rule's when selecting a
replacement address for an rdr rule. Some rdr rules have no address family (when the replacement is a table and no other criterion implies one AF). In this case, pf would fail to select a replacement address and drop the packet due to translation failure. Found by: Gustavo A. Baratto
Diffstat (limited to 'sys/contrib/pf')
-rw-r--r--sys/contrib/pf/net/pf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/contrib/pf/net/pf.c b/sys/contrib/pf/net/pf.c
index 22ece97..d71a435 100644
--- a/sys/contrib/pf/net/pf.c
+++ b/sys/contrib/pf/net/pf.c
@@ -2362,7 +2362,7 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, int direction,
}
break;
case PF_RDR: {
- if (pf_map_addr(r->af, r, saddr, naddr, NULL, sn))
+ if (pf_map_addr(pd->af, r, saddr, naddr, NULL, sn))
return (NULL);
if (r->rpool.proxy_port[1]) {
OpenPOWER on IntegriCloud