Source-Changes-HG archive

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

[src/trunk]: src/sys/net Remove extra rt_refcnt++ in rtalloc1



details:   https://anonhg.NetBSD.org/src/rev/fc1f36dd9941
branches:  trunk
changeset: 339847:fc1f36dd9941
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Thu Aug 13 10:14:26 2015 +0000

description:
Remove extra rt_refcnt++ in rtalloc1

rtrequest has already done it. So we don't need to do it once more.

This fixes regressed behavior of ARP cache expiration which an expired
cache doesn't disappear.

diffstat:

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

diffs (26 lines):

diff -r dbee606cc525 -r fc1f36dd9941 sys/net/route.c
--- a/sys/net/route.c   Thu Aug 13 10:03:37 2015 +0000
+++ b/sys/net/route.c   Thu Aug 13 10:14:26 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: route.c,v 1.147 2015/08/13 07:59:05 ozaki-r Exp $      */
+/*     $NetBSD: route.c,v 1.148 2015/08/13 10:14:26 ozaki-r Exp $      */
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -94,7 +94,7 @@
 #include "opt_route.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.147 2015/08/13 07:59:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.148 2015/08/13 10:14:26 ozaki-r Exp $");
 
 #include <sys/param.h>
 #ifdef RTFLUSH_DEBUG
@@ -379,7 +379,6 @@
                        }
                        KASSERT(newrt != NULL);
                        rt = newrt;
-                       rt->rt_refcnt++;
                        if (rt->rt_flags & RTF_XRESOLVE) {
                                msgtype = RTM_RESOLVE;
                                goto miss;



Home | Main Index | Thread Index | Old Index