summaryrefslogtreecommitdiffstats
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authoritojun <itojun@openbsd.org>2003-07-09 22:03:15 +0000
committeritojun <itojun@openbsd.org>2003-07-09 22:03:15 +0000
commit85f7599b374a41ec5d11acfae514c94850bbe1e3 (patch)
tree1f5b2bb57030ac7b16fa1c884fd220555bcb3944 /sys/netinet/udp_usrreq.c
parentopen() is not ANSI; (diff)
downloadwireguard-openbsd-85f7599b374a41ec5d11acfae514c94850bbe1e3.tar.xz
wireguard-openbsd-85f7599b374a41ec5d11acfae514c94850bbe1e3.zip
do not flip ip_len/ip_off in netinet stack. deraadt ok.
(please test, especially PF portion)
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 5f726dff5fb..9e5842d6087 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp_usrreq.c,v 1.90 2003/06/02 23:28:15 millert Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.91 2003/07/09 22:03:16 itojun Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
@@ -949,7 +949,7 @@ udp_output(struct mbuf *m, ...)
sizeof (struct udphdr) + IPPROTO_UDP));
} else
ui->ui_sum = 0;
- ((struct ip *)ui)->ip_len = sizeof (struct udpiphdr) + len;
+ ((struct ip *)ui)->ip_len = htons(sizeof (struct udpiphdr) + len);
((struct ip *)ui)->ip_ttl = inp->inp_ip.ip_ttl;
((struct ip *)ui)->ip_tos = inp->inp_ip.ip_tos;