summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ip4.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1999-01-08 21:51:24 +0000
committerNiels Provos <provos@cvs.openbsd.org>1999-01-08 21:51:24 +0000
commitc07341fac2ce2741b6a76adc2a128945bb889594 (patch)
tree321668943b40bf61453e796600fb41cd7fa98c51 /sys/netinet/ip_ip4.c
parentf516dcb4a03468a0ee9f72fa265fd61d97333609 (diff)
dont call ip_randomid() in htons().
Diffstat (limited to 'sys/netinet/ip_ip4.c')
-rw-r--r--sys/netinet/ip_ip4.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/ip_ip4.c b/sys/netinet/ip_ip4.c
index 50a819b4246..0315ea03494 100644
--- a/sys/netinet/ip_ip4.c
+++ b/sys/netinet/ip_ip4.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ip4.c,v 1.21 1998/12/26 12:35:11 provos Exp $ */
+/* $OpenBSD: ip_ip4.c,v 1.22 1999/01/08 21:51:21 provos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -224,7 +224,8 @@ ipe4_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb,
ipo->ip_hl = 5;
ipo->ip_tos = ipi->ip_tos;
ipo->ip_len = htons(ilen + sizeof(struct ip));
- ipo->ip_id = htons(ip_randomid());
+ ipo->ip_id = ip_randomid();
+ HTONS(ipo->ip_id);
ipo->ip_off = ipi->ip_off & ~(IP_MF | IP_OFFMASK); /* keep C and DF */
if (tdb->tdb_flags & TDBF_SAME_TTL)