summaryrefslogtreecommitdiff
path: root/sys/net/pf_lb.c
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2009-09-07 08:27:46 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2009-09-07 08:27:46 +0000
commitcdae399e33777b3ee4bb352c2d3fe13f7a9c071b (patch)
treeaad2300ebffc0d1fc4f8aaa2fe0536d12aa32cdd /sys/net/pf_lb.c
parent8f1649586ccc62794e0840aa77c28fb4cd52d48e (diff)
Fix static-port, found by jmc@. ok henning@.
Diffstat (limited to 'sys/net/pf_lb.c')
-rw-r--r--sys/net/pf_lb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/pf_lb.c b/sys/net/pf_lb.c
index 1f4c0e3d9b2..0a1b0de5f28 100644
--- a/sys/net/pf_lb.c
+++ b/sys/net/pf_lb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_lb.c,v 1.6 2009/09/01 13:42:00 henning Exp $ */
+/* $OpenBSD: pf_lb.c,v 1.7 2009/09/07 08:27:45 sthen Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -461,7 +461,8 @@ pf_get_transaddr(struct pf_rule *r, struct pf_pdesc *pd, struct pf_addr *saddr,
return (-1);
}
PF_ACPY(saddr, &naddr, pd->af);
- *sport = nport;
+ if (nport)
+ *sport = nport;
}
if (!TAILQ_EMPTY(&r->rdr.list)) {
if (pf_map_addr(pd->af, r, saddr, &naddr, NULL, &sn, &r->rdr))