summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2011-01-06 14:01:37 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2011-01-06 14:01:37 +0000
commite8de9439462e579b1f98f22e8f03aa18a8497652 (patch)
tree9f22f303915b49969242b8dbea284f42df3e2fe6 /sys
parent0ff3a349bb43d499900b014f3afa080904cacbca (diff)
Put htons() around ip_randomid() for pf scrub random-id to make it
consistent with the network stack. ok mcbride@ henning@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/pf_norm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/pf_norm.c b/sys/net/pf_norm.c
index 8df15a68c31..356927177ef 100644
--- a/sys/net/pf_norm.c
+++ b/sys/net/pf_norm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_norm.c,v 1.124 2010/12/31 12:26:57 bluhm Exp $ */
+/* $OpenBSD: pf_norm.c,v 1.125 2011/01/06 14:01:36 bluhm Exp $ */
/*
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
@@ -1333,7 +1333,7 @@ pf_scrub_ip(struct mbuf **m0, u_int16_t flags, u_int8_t min_ttl, u_int8_t tos)
if (flags & PFSTATE_RANDOMID && !(h->ip_off & ~htons(IP_DF))) {
u_int16_t ip_id = h->ip_id;
- h->ip_id = ip_randomid();
+ h->ip_id = htons(ip_randomid());
h->ip_sum = pf_cksum_fixup(h->ip_sum, ip_id, h->ip_id, 0);
}
}