summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-11-16 04:06:46 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-11-16 04:06:46 +0000
commit9dcc79c09fd005a364c2c7c724676e392d400809 (patch)
tree9a0b3e725323de675455cea9e4bb999e70191183 /sys/netinet
parent37be61c23fb9a84e57c7603051199874d9678247 (diff)
SPIs are kept in network byte order
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_ipsp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c
index 31700ec9c8c..6f7bdb4dd2d 100644
--- a/sys/netinet/ip_ipsp.c
+++ b/sys/netinet/ip_ipsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.c,v 1.27 1998/10/13 06:49:46 niklas Exp $ */
+/* $OpenBSD: ip_ipsp.c,v 1.28 1998/11/16 04:06:45 deraadt Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -283,7 +283,7 @@ reserve_spi(u_int32_t tspi, struct in_addr src, u_int8_t proto, int *errval)
while (1)
{
- while (spi <= 255) /* Get a new SPI */
+ while (ntohl(spi) <= 255) /* Get a new SPI */
get_random_bytes((void *) &spi, sizeof(spi));
/* Check whether we're using this SPI already */