[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: load balance (rdr) with tables

It turns out to be a rather simple bug. Could you try the patch below
and check whether it resolves the issue for you, too?
If it doesn't apply cleanly to FreeBSD, it's simple to apply manually:
  - edit /usr/src/sys/contrib/pf/net/pf.c
  - find function pf_get_translation()
  - within that function, find 'case PF_RDR:'
  - on the next line there's a call to pf_map_addr()
  - change its first argument from r->af to pd->af
  - recompile kernel, reboot with new kernel, try to reproduce problem
Index: pf.c
RCS file: /cvs/src/sys/net/pf.c,v
retrieving revision 1.477
diff -u -r1.477 pf.c
--- pf.c	7 Jan 2005 18:58:39 -0000	1.477
+++ pf.c	18 Jan 2005 04:15:50 -0000
@@ -2409,7 +2409,7 @@
 		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]) {