summaryrefslogtreecommitdiff
path: root/sys/netmpls
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-09-23 08:49:47 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-09-23 08:49:47 +0000
commit7f73a7668a46b82c82c6a81e30a77113b9193919 (patch)
treef8c210384a91c1b25474d2e74fcf03a8964f8234 /sys/netmpls
parent862c5e15d06293fdd79f850f89f209f76302a1e8 (diff)
Always increment rt_use inside rtalloc(9) instead of doing it in some
specific places. ok claudio@, benno@
Diffstat (limited to 'sys/netmpls')
-rw-r--r--sys/netmpls/mpls_input.c4
-rw-r--r--sys/netmpls/mpls_output.c3
2 files changed, 2 insertions, 5 deletions
diff --git a/sys/netmpls/mpls_input.c b/sys/netmpls/mpls_input.c
index 3499087c275..f269108c344 100644
--- a/sys/netmpls/mpls_input.c
+++ b/sys/netmpls/mpls_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpls_input.c,v 1.49 2015/09/13 17:53:44 mpi Exp $ */
+/* $OpenBSD: mpls_input.c,v 1.50 2015/09/23 08:49:46 mpi Exp $ */
/*
* Copyright (c) 2008 Claudio Jeker <claudio@openbsd.org>
@@ -182,7 +182,6 @@ do_v6:
goto done;
}
- rt->rt_use++;
rt_mpls = (struct rt_mpls *)rt->rt_llinfo;
if (rt_mpls == NULL || (rt->rt_flags & RTF_MPLS) == 0) {
@@ -449,7 +448,6 @@ mpls_do_error(struct mbuf *m, int type, int code, int destmtu)
m_freem(m);
return (NULL);
}
- rt->rt_use++;
KERNEL_LOCK();
rtfree(rt);
if (icmp_reflect(m, NULL, ia)) {
diff --git a/sys/netmpls/mpls_output.c b/sys/netmpls/mpls_output.c
index 53054ac2d36..615efab2e06 100644
--- a/sys/netmpls/mpls_output.c
+++ b/sys/netmpls/mpls_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpls_output.c,v 1.24 2015/09/13 17:53:44 mpi Exp $ */
+/* $OpenBSD: mpls_output.c,v 1.25 2015/09/23 08:49:46 mpi Exp $ */
/*
* Copyright (c) 2008 Claudio Jeker <claudio@openbsd.org>
@@ -133,7 +133,6 @@ mpls_output(struct ifnet *ifp0, struct mbuf *m, struct sockaddr *dst,
error = EHOSTUNREACH;
goto bad;
}
- rt->rt_use++;
}
/* write back TTL */