diff options
author | 2003-05-06 21:21:23 +0000 | |
---|---|---|
committer | 2003-05-06 21:21:23 +0000 | |
commit | fd2b857550df46c76c2c4ea6db9932bbbceaee8b (patch) | |
tree | 77fc584c1119a5ebc4ea18490ea23c15c8aa0dc7 | |
parent | fix harmless typo i introduced with previous string cleaning. (diff) | |
download | wireguard-openbsd-fd2b857550df46c76c2c4ea6db9932bbbceaee8b.tar.xz wireguard-openbsd-fd2b857550df46c76c2c4ea6db9932bbbceaee8b.zip |
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@
-rw-r--r-- | sys/net/pf.c | 3 |
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: |