Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet for incoming broadcasts, strip IP/UDP header cor...
details: https://anonhg.NetBSD.org/src/rev/a69cce533c48
branches: trunk
changeset: 474440:a69cce533c48
user: drochner <drochner%NetBSD.org@localhost>
date: Tue Jul 06 14:37:47 1999 +0000
description:
for incoming broadcasts, strip IP/UDP header correctly
wrap a line
diffstat:
sys/netinet/udp_usrreq.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r 89076a8c25c6 -r a69cce533c48 sys/netinet/udp_usrreq.c
--- a/sys/netinet/udp_usrreq.c Tue Jul 06 14:37:05 1999 +0000
+++ b/sys/netinet/udp_usrreq.c Tue Jul 06 14:37:47 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udp_usrreq.c,v 1.48 1999/07/01 08:12:52 itojun Exp $ */
+/* $NetBSD: udp_usrreq.c,v 1.49 1999/07/06 14:37:47 drochner Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -280,16 +280,17 @@
} else
#endif /*IPSEC*/
if ((n = m_copy(m, 0, M_COPYALL)) != NULL) {
- m_adj(m, iphlen);
if (last->inp_flags & INP_CONTROLOPTS
|| last->inp_socket->so_options &
SO_TIMESTAMP) {
ip_savecontrol(last, &opts,
ip, n);
}
+ m_adj(n, iphlen);
sa = (struct sockaddr *)&udpsrc;
#ifdef MAPPED_ADDR_ENABLED
- if (last->inp_socket->so_proto->pr_domain->dom_family == AF_INET6) {
+ if (last->inp_socket->so_proto->
+ pr_domain->dom_family == AF_INET6) {
in6_sin_2_v4mapsin6(&udpsrc,
&mapped);
sa = (struct sockaddr *)&mapped;
@@ -340,6 +341,9 @@
if (last->inp_flags & INP_CONTROLOPTS ||
last->inp_socket->so_options & SO_TIMESTAMP)
ip_savecontrol(last, &opts, ip, m);
+ m->m_len -= iphlen;
+ m->m_pkthdr.len -= iphlen;
+ m->m_data += iphlen;
sa = (struct sockaddr *)&udpsrc;
#ifdef MAPPED_ADDR_ENABLED
if (last->inp_socket->so_proto->pr_domain->dom_family ==
Home |
Main Index |
Thread Index |
Old Index