Page MenuHomeFreeBSD

D18483.id.diff
No OneTemporary

D18483.id.diff

Index: head/sys/netpfil/pf/pf.c
===================================================================
--- head/sys/netpfil/pf/pf.c
+++ head/sys/netpfil/pf/pf.c
@@ -5513,6 +5513,8 @@
dst.sin_len = sizeof(dst);
dst.sin_addr = ip->ip_dst;
+ bzero(&naddr, sizeof(naddr));
+
if (TAILQ_EMPTY(&r->rpool.list)) {
DPFPRINTF(PF_DEBUG_URGENT,
("%s: TAILQ_EMPTY(&r->rpool.list)\n", __func__));
@@ -5671,6 +5673,8 @@
dst.sin6_family = AF_INET6;
dst.sin6_len = sizeof(dst);
dst.sin6_addr = ip6->ip6_dst;
+
+ bzero(&naddr, sizeof(naddr));
if (TAILQ_EMPTY(&r->rpool.list)) {
DPFPRINTF(PF_DEBUG_URGENT,
Index: head/sys/netpfil/pf/pf_lb.c
===================================================================
--- head/sys/netpfil/pf/pf_lb.c
+++ head/sys/netpfil/pf/pf_lb.c
@@ -328,6 +328,12 @@
src node was created just a moment ago in pf_create_state and it
needs to be filled in with routing decision calculated here. */
if (*sn != NULL && !PF_AZERO(&(*sn)->raddr, af)) {
+ /* If the supplied address is the same as the current one we've
+ * been asked before, so tell the caller that there's no other
+ * address to be had. */
+ if (PF_AEQ(naddr, &(*sn)->raddr, af))
+ return (1);
+
PF_ACPY(naddr, &(*sn)->raddr, af);
if (V_pf_status.debug >= PF_DEBUG_MISC) {
printf("pf_map_addr: src tracking maps ");

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 21, 10:58 PM (16 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25820671
Default Alt Text
D18483.id.diff (1 KB)

Event Timeline