Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Don't copy M_EXT mbufs unless in "dhcp" mode. D...
details: https://anonhg.NetBSD.org/src/rev/23782dbfd644
branches: trunk
changeset: 488018:23782dbfd644
user: matt <matt%NetBSD.org@localhost>
date: Fri Jun 16 20:21:26 2000 +0000
description:
Don't copy M_EXT mbufs unless in "dhcp" mode. Do a mtod after the pullup
to make sure the ip pointer is still valid.
diffstat:
sys/netinet/igmp.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diffs (44 lines):
diff -r daae6d28be94 -r 23782dbfd644 sys/netinet/igmp.c
--- a/sys/netinet/igmp.c Fri Jun 16 19:51:05 2000 +0000
+++ b/sys/netinet/igmp.c Fri Jun 16 20:21:26 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: igmp.c,v 1.24 2000/03/30 13:24:54 augustss Exp $ */
+/* $NetBSD: igmp.c,v 1.25 2000/06/16 20:21:26 matt Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -62,7 +62,7 @@
#define IP_MULTICASTOPTS 0
-int igmp_timers_are_running;
+int igmp_timers_are_running;
static struct router_info *rti_head;
void igmp_sendpkt __P((struct in_multi *, int));
@@ -164,10 +164,13 @@
m_freem(m);
return;
}
- if ((m->m_flags & M_EXT || m->m_len < minlen) &&
- (m = m_pullup(m, minlen)) == 0) {
- ++igmpstat.igps_rcv_tooshort;
- return;
+ if (((m->m_flags & M_EXT) && (ip->ip_src.s_addr & IN_CLASSA_NET) == 0)
+ || m->m_len < minlen) {
+ if ((m = m_pullup(m, minlen)) == 0) {
+ ++igmpstat.igps_rcv_tooshort;
+ return;
+ }
+ ip = mtod(m, struct ip *);
}
/*
@@ -183,7 +186,6 @@
}
m->m_data -= iphlen;
m->m_len += iphlen;
- ip = mtod(m, struct ip *);
switch (igmp->igmp_type) {
Home |
Main Index |
Thread Index |
Old Index