summaryrefslogtreecommitdiffstats
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-09-07 02:19:24 +0000
committerderaadt <deraadt@openbsd.org>1997-09-07 02:19:24 +0000
commit6e0e654874dde639b87f53b9a7f3e7710be95a03 (patch)
treeb9a310df2d48764de5d94cfaebb47d6819b62d7a /sys/netinet/udp_usrreq.c
parentfix some spelling errors (diff)
downloadwireguard-openbsd-6e0e654874dde639b87f53b9a7f3e7710be95a03.tar.xz
wireguard-openbsd-6e0e654874dde639b87f53b9a7f3e7710be95a03.zip
for broadcast/multicast packets, correct m_pkthdr.len on the way up to the socket; drochner@zelz26.zel.kfa-juelich.de
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index eed1e4db382..e68f0241e94 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp_usrreq.c,v 1.12 1997/08/09 23:36:28 millert Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.13 1997/09/07 02:19:24 deraadt Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
@@ -199,8 +199,10 @@ udp_input(m, va_alist)
*/
udp_in.sin_port = uh->uh_sport;
udp_in.sin_addr = ip->ip_src;
- m->m_len -= sizeof (struct udpiphdr);
- m->m_data += sizeof (struct udpiphdr);
+ iphlen += sizeof(struct udphdr);
+ m->m_len -= iphlen;
+ m->m_pkthdr.len -= iphlen;
+ m->m_data += iphlen;
/*
* Locate pcb(s) for datagram.
* (Algorithm copied from raw_intr().)