Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Fix m_reset_rcvif



details:   https://anonhg.NetBSD.org/src/rev/087c4da55879
branches:  trunk
changeset: 345871:087c4da55879
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Sun Jun 12 10:14:12 2016 +0000

description:
Fix m_reset_rcvif

m_reset_rcvif should zero whole m_pkthdr._rcvif union, which is
the original behavior.

diffstat:

 sys/sys/mbuf.h |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r a38ba7e53dc4 -r 087c4da55879 sys/sys/mbuf.h
--- a/sys/sys/mbuf.h    Sun Jun 12 09:42:41 2016 +0000
+++ b/sys/sys/mbuf.h    Sun Jun 12 10:14:12 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mbuf.h,v 1.164 2016/06/10 13:31:45 ozaki-r Exp $       */
+/*     $NetBSD: mbuf.h,v 1.165 2016/06/12 10:14:12 ozaki-r Exp $       */
 
 /*-
  * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
@@ -980,7 +980,9 @@
 m_reset_rcvif(struct mbuf *m)
 {
 
-       m->m_pkthdr.rcvif_index = 0;
+       /* A caller may expect whole _rcvif union is zeroed */
+       /* m->m_pkthdr.rcvif_index = 0; */
+       m->m_pkthdr._rcvif.ctx = NULL;
 }
 
 static __inline void



Home | Main Index | Thread Index | Old Index