summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2003-02-12 12:50:30 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2003-02-12 12:50:30 +0000
commitd15fe7a83961af6c305059fa2c1cc363adf966e8 (patch)
treef99f5ec07811206211665c0609cee8ef81c76d9b
parent3d574fb7166fadfc50aa65e824fd204afa91e299 (diff)
Make r.rpool.proxy_port[] a consistent byte order to match cleanup in
pfctl. ok dhartmei@
-rw-r--r--sys/net/pf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 0c79fc07f28..079df8073a7 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.318 2003/02/12 03:02:23 mcbride Exp $ */
+/* $OpenBSD: pf.c,v 1.319 2003/02/12 12:50:29 mcbride Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -1764,16 +1764,16 @@ pf_get_translation(int direction, struct ifnet *ifp, u_int8_t proto,
tmp_nport = ((ntohs(dport) -
ntohs(r->dst.port[0])) %
- (ntohs(r->rpool.proxy_port[1]) -
- ntohs(r->rpool.proxy_port[0]) + 1)) +
- ntohs(r->rpool.proxy_port[0]);
+ (r->rpool.proxy_port[1] -
+ r->rpool.proxy_port[0] + 1)) +
+ r->rpool.proxy_port[0];
/* wrap around if necessary */
if (tmp_nport > 65535)
tmp_nport -= 65535;
*nport = htons((u_int16_t)tmp_nport);
} else if (r->rpool.proxy_port[0])
- *nport = r->rpool.proxy_port[0];
+ *nport = htons(r->rpool.proxy_port[0]);
break;
}
default: