Date: Thu, 6 Dec 2018 18:58:54 +0000 (UTC) From: Kristof Provost <kp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r341642 - head/sys/netpfil/pf Message-ID: <201812061858.wB6IwsvJ099881@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kp Date: Thu Dec 6 18:58:54 2018 New Revision: 341642 URL: https://svnweb.freebsd.org/changeset/base/341642 Log: pf: add a comment describing why do we call pf_map_addr again if port selection process fails Obtained from: OpenBSD Modified: head/sys/netpfil/pf/pf_lb.c Modified: head/sys/netpfil/pf/pf_lb.c ============================================================================== --- head/sys/netpfil/pf/pf_lb.c Thu Dec 6 18:21:48 2018 (r341641) +++ head/sys/netpfil/pf/pf_lb.c Thu Dec 6 18:58:54 2018 (r341642) @@ -293,6 +293,10 @@ pf_get_sport(sa_family_t af, u_int8_t proto, struct pf switch (r->rpool.opts & PF_POOL_TYPEMASK) { case PF_POOL_RANDOM: case PF_POOL_ROUNDROBIN: + /* + * pick a different source address since we're out + * of free port choices for the current one. + */ if (pf_map_addr(af, r, saddr, naddr, &init_addr, sn)) return (1); break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812061858.wB6IwsvJ099881>