Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 Cleanup nd6_nud_hint
details: https://anonhg.NetBSD.org/src/rev/2a500f4b46f3
branches: trunk
changeset: 340348:2a500f4b46f3
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Tue Sep 01 08:46:27 2015 +0000
description:
Cleanup nd6_nud_hint
The deleted rtfree was never called.
diffstat:
sys/netinet6/nd6.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diffs (64 lines):
diff -r a3359a3c9e5f -r 2a500f4b46f3 sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c Tue Sep 01 06:24:21 2015 +0000
+++ b/sys/netinet6/nd6.c Tue Sep 01 08:46:27 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6.c,v 1.170 2015/08/31 03:26:53 ozaki-r Exp $ */
+/* $NetBSD: nd6.c,v 1.171 2015/09/01 08:46:27 ozaki-r Exp $ */
/* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.170 2015/08/31 03:26:53 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.171 2015/09/01 08:46:27 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -1167,10 +1167,9 @@
* XXX cost-effective methods?
*/
void
-nd6_nud_hint(struct rtentry *rt0)
+nd6_nud_hint(struct rtentry *rt)
{
struct llinfo_nd6 *ln;
- struct rtentry *rt = rt0;
if (rt == NULL)
return;
@@ -1180,12 +1179,12 @@
!rt->rt_llinfo || !rt->rt_gateway ||
rt->rt_gateway->sa_family != AF_LINK) {
/* This is not a host route. */
- goto exit;
+ return;
}
ln = (struct llinfo_nd6 *)rt->rt_llinfo;
if (ln->ln_state < ND6_LLINFO_REACHABLE)
- goto exit;
+ return;
/*
* if we get upper-layer reachability confirmation many times,
@@ -1193,16 +1192,14 @@
*/
ln->ln_byhint++;
if (ln->ln_byhint > nd6_maxnudhint)
- goto exit;
+ return;
ln->ln_state = ND6_LLINFO_REACHABLE;
if (!ND6_LLINFO_PERMANENT(ln)) {
nd6_llinfo_settimer(ln,
(long)ND_IFINFO(rt->rt_ifp)->reachable * hz);
}
-exit:
- if (rt != rt0)
- rtfree(rt);
+
return;
}
Home |
Main Index |
Thread Index |
Old Index