summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2013-10-30 11:18:33 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2013-10-30 11:18:33 +0000
commit355b88dfc71522681c57aecccfcd291bf5c25f58 (patch)
tree879f1b54dc1147570b26c42a9c63f925dac15f16 /sys
parent508175768f9b15ad5a130bc3f4831990fa88ecdc (diff)
add a comment describing why do we call pf_map_addr again if port
selection process fails; ok henning
Diffstat (limited to 'sys')
-rw-r--r--sys/net/pf_lb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/pf_lb.c b/sys/net/pf_lb.c
index 58bd7af9078..b9312ecf7d2 100644
--- a/sys/net/pf_lb.c
+++ b/sys/net/pf_lb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_lb.c,v 1.28 2013/10/24 11:31:43 mpi Exp $ */
+/* $OpenBSD: pf_lb.c,v 1.29 2013/10/30 11:18:32 mikeb Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -254,6 +254,10 @@ pf_get_sport(struct pf_pdesc *pd, struct pf_rule *r,
case PF_POOL_RANDOM:
case PF_POOL_ROUNDROBIN:
case PF_POOL_LEASTSTATES:
+ /*
+ * pick a different source address since we're out
+ * of free port choices for the current one.
+ */
if (pf_map_addr(pd->naf, r, &pd->nsaddr, naddr,
&init_addr, sn, &r->nat, PF_SN_NAT))
return (1);