Source-Changes-HG archive

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

[src/trunk]: src/sys/net Add an assertion; if rtcache has an rtentry, its ref...



details:   https://anonhg.NetBSD.org/src/rev/ffff25b548d1
branches:  trunk
changeset: 810268:ffff25b548d1
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Mon Aug 24 04:44:54 2015 +0000

description:
Add an assertion; if rtcache has an rtentry, its refcnt must be > 0

diffstat:

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

diffs (17 lines):

diff -r 573da2b62739 -r ffff25b548d1 sys/net/route.h
--- a/sys/net/route.h   Mon Aug 24 02:02:25 2015 +0000
+++ b/sys/net/route.h   Mon Aug 24 04:44:54 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: route.h,v 1.92 2015/07/17 02:21:08 ozaki-r Exp $       */
+/*     $NetBSD: route.h,v 1.93 2015/08/24 04:44:54 ozaki-r Exp $       */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -430,6 +430,7 @@
 {
        KASSERT(ro->ro_sa != NULL || ro->_ro_rt == NULL);
        KASSERT(!ro->ro_invalid || ro->_ro_rt != NULL);
+       KASSERT(ro->_ro_rt == NULL || ro->_ro_rt->rt_refcnt > 0);
 }
 
 static inline struct rtentry *



Home | Main Index | Thread Index | Old Index