diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-09-07 02:19:25 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-09-07 02:19:25 +0000 |
commit | d082a77eeb8cb8fb0beca048f30c63a80418a400 (patch) | |
tree | be5fd982694bdc82f88362da812f515ac153a8dd | |
parent | 920837b47da88bacfc76de307f5a123cc2f05657 (diff) |
for broadcast/multicast packets, correct m_pkthdr.len on the way up to the socket; drochner@zelz26.zel.kfa-juelich.de
-rw-r--r-- | sys/netinet/udp_usrreq.c | 8 |
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().) |