Source-Changes-HG archive

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

[src/trunk]: src/sys/net Add a KASSERT in IFQ_CLASSIFY, we really need to mak...



details:   https://anonhg.NetBSD.org/src/rev/43da7d9f3e62
branches:  trunk
changeset: 829048:43da7d9f3e62
user:      maxv <maxv%NetBSD.org@localhost>
date:      Mon Jan 15 13:05:40 2018 +0000

description:
Add a KASSERT in IFQ_CLASSIFY, we really need to make sure the given
mbuf is the top of the chain.

diffstat:

 sys/net/if.h |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r e1974c154fb9 -r 43da7d9f3e62 sys/net/if.h
--- a/sys/net/if.h      Mon Jan 15 12:58:06 2018 +0000
+++ b/sys/net/if.h      Mon Jan 15 13:05:40 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.h,v 1.257 2017/12/18 08:24:29 ozaki-r Exp $ */
+/*     $NetBSD: if.h,v 1.258 2018/01/15 13:05:40 maxv Exp $    */
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -986,6 +986,7 @@
 
 #define        IFQ_CLASSIFY(ifq, m, af)                                        \
 do {                                                                   \
+       KASSERT((m->m_flags & M_PKTHDR) != 0);                          \
        mutex_enter((ifq)->ifq_lock);                                   \
        if (ALTQ_IS_ENABLED((ifq))) {                                   \
                if (ALTQ_NEEDS_CLASSIFY((ifq)))                         \



Home | Main Index | Thread Index | Old Index