summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2003-05-06 21:21:24 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2003-05-06 21:21:24 +0000
commit00ed84ae72172c64514620c0c25d98604c44cc5b (patch)
tree4108439869be83466878b166271bf7fdb5b3036c /sys/net
parent56390a11929800712f703577253ff58204924df2 (diff)
Fix a bug that prevents rdr/binat (but not nat) from working for protocols
other than TCP, UDP and ICMP (for instance GRE). Reported by Gunnar Helliesen. ok henning@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/pf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 8a2cdefa588..a1095fbf00f 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.339 2003/04/30 12:30:27 cedric Exp $ */
+/* $OpenBSD: pf.c,v 1.340 2003/05/06 21:21:23 dhartmei Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -2630,6 +2630,7 @@ pf_test_other(struct pf_rule **rm, struct pf_state **sm, int direction,
/* check incoming packet for BINAT/RDR */
if ((rdr = pf_get_translation(PF_IN, ifp, pd->proto,
saddr, 0, daddr, 0, &naddr, NULL, af)) != NULL) {
+ PF_ACPY(&baddr, daddr, af);
switch (af) {
#ifdef INET
case AF_INET: