Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Check the multicast bit in the header mbuf while int...
details: https://anonhg.NetBSD.org/src/rev/f0036814aff0
branches: trunk
changeset: 487863:f0036814aff0
user: mycroft <mycroft%NetBSD.org@localhost>
date: Wed Jun 14 05:10:27 2000 +0000
description:
Check the multicast bit in the header mbuf while interrupts are still blocked.
Otherwise we can run off into space if the packet was sent immediately and the
mbuf freed.
Pointed out by Boris Popov (not on our lists).
diffstat:
sys/net/if_ethersubr.c | 6 +++---
sys/net/if_fddisubr.c | 6 +++---
sys/net/if_tokensubr.c | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
diffs (72 lines):
diff -r 3abc18dc690c -r f0036814aff0 sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c Wed Jun 14 03:57:23 2000 +0000
+++ b/sys/net/if_ethersubr.c Wed Jun 14 05:10:27 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ethersubr.c,v 1.56 2000/05/12 16:22:36 thorpej Exp $ */
+/* $NetBSD: if_ethersubr.c,v 1.57 2000/06/14 05:10:27 mycroft Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -474,12 +474,12 @@
senderr(ENOBUFS);
}
ifp->if_obytes += m->m_pkthdr.len;
+ if (m->m_flags & M_MCAST)
+ ifp->if_omcasts++;
IF_ENQUEUE(&ifp->if_snd, m);
if ((ifp->if_flags & IFF_OACTIVE) == 0)
(*ifp->if_start)(ifp);
splx(s);
- if (m->m_flags & M_MCAST)
- ifp->if_omcasts++;
return (error);
bad:
diff -r 3abc18dc690c -r f0036814aff0 sys/net/if_fddisubr.c
--- a/sys/net/if_fddisubr.c Wed Jun 14 03:57:23 2000 +0000
+++ b/sys/net/if_fddisubr.c Wed Jun 14 05:10:27 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_fddisubr.c,v 1.32 2000/05/28 02:49:36 matt Exp $ */
+/* $NetBSD: if_fddisubr.c,v 1.33 2000/06/14 05:10:28 mycroft Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -581,12 +581,12 @@
senderr(ENOBUFS);
}
ifp->if_obytes += m->m_pkthdr.len;
+ if (m->m_flags & M_MCAST)
+ ifp->if_omcasts++;
IF_ENQUEUE(&ifp->if_snd, m);
if ((ifp->if_flags & IFF_OACTIVE) == 0)
(*ifp->if_start)(ifp);
splx(s);
- if (m->m_flags & M_MCAST)
- ifp->if_omcasts++;
return (error);
bad:
diff -r 3abc18dc690c -r f0036814aff0 sys/net/if_tokensubr.c
--- a/sys/net/if_tokensubr.c Wed Jun 14 03:57:23 2000 +0000
+++ b/sys/net/if_tokensubr.c Wed Jun 14 05:10:27 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tokensubr.c,v 1.9 2000/03/30 09:45:37 augustss Exp $ */
+/* $NetBSD: if_tokensubr.c,v 1.10 2000/06/14 05:10:28 mycroft Exp $ */
/*
* Copyright (c) 1997-1999
@@ -451,12 +451,12 @@
senderr(ENOBUFS);
}
ifp->if_obytes += m->m_pkthdr.len;
+ if (m->m_flags & M_MCAST)
+ ifp->if_omcasts++;
IF_ENQUEUE(&ifp->if_snd, m);
if ((ifp->if_flags & IFF_OACTIVE) == 0)
(*ifp->if_start)(ifp);
splx(s);
- if (m->m_flags & M_MCAST)
- ifp->if_omcasts++;
return (error);
bad:
Home |
Main Index |
Thread Index |
Old Index