aboutsummaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2020-05-11 06:09:18 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2020-05-11 06:09:18 +0000
commit4a6ee281d9b3cf45f2894b11bcdf2a27f508cdf7 (patch)
treecda03a6667a920c12ca24ca87bbc8bf674b4f78e /sys/net
parent6851341a3328ce3c36a52f24086f1b8bed1dde82 (diff)
downloadsrc-4a6ee281d9b3cf45f2894b11bcdf2a27f508cdf7.tar.gz
src-4a6ee281d9b3cf45f2894b11bcdf2a27f508cdf7.zip
Remove unused rnh_close callback from rtable & cleanup depends.
rnh_close callbackes was used by the in[6]_clsroute() handlers, doing cleanup in the route cloning code. Route cloning was eliminated somewhere around r186119. Last callback user was eliminated in r186215, 11 years ago. Differential Revision: https://reviews.freebsd.org/D24793
Notes
Notes: svn path=/head/; revision=360889
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/route.c16
-rw-r--r--sys/net/route/route_var.h2
2 files changed, 0 insertions, 18 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index cbac28f98e0f..1b966b691bd5 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -426,11 +426,8 @@ sys_setfib(struct thread *td, struct setfib_args *uap)
void
rtfree(struct rtentry *rt)
{
- struct rib_head *rnh;
KASSERT(rt != NULL,("%s: NULL rt", __func__));
- rnh = rt_tables_get_rnh(rt->rt_fibnum, rt_key(rt)->sa_family);
- KASSERT(rnh != NULL,("%s: NULL rnh", __func__));
RT_LOCK_ASSERT(rt);
@@ -445,18 +442,6 @@ rtfree(struct rtentry *rt)
}
/*
- * On last reference give the "close method" a chance
- * to cleanup private state. This also permits (for
- * IPv4 and IPv6) a chance to decide if the routing table
- * entry should be purged immediately or at a later time.
- * When an immediate purge is to happen the close routine
- * typically calls rtexpunge which clears the RTF_UP flag
- * on the entry so that the code below reclaims the storage.
- */
- if (rt->rt_refcnt == 0 && rnh->rnh_close)
- rnh->rnh_close((struct radix_node *)rt, &rnh->head);
-
- /*
* If we are no longer "up" (and ref == 0)
* then we can free the resources associated
* with the route.
@@ -1501,7 +1486,6 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *info,
return (ENOBUFS);
}
rt->rt_flags = RTF_UP | flags;
- rt->rt_fibnum = rnh->rib_fibnum;
rt->rt_nhop = nh;
/* Fill in dst */
diff --git a/sys/net/route/route_var.h b/sys/net/route/route_var.h
index 02bf15204fe6..3dfe7f152954 100644
--- a/sys/net/route/route_var.h
+++ b/sys/net/route/route_var.h
@@ -50,7 +50,6 @@ struct rib_head {
rn_lookup_f_t *rnh_lookup; /* exact match for sockaddr */
rn_walktree_t *rnh_walktree; /* traverse tree */
rn_walktree_from_t *rnh_walktree_from; /* traverse tree below a */
- rn_close_t *rnh_close; /*do something when the last ref drops*/
rnh_preadd_entry_f_t *rnh_preadd; /* hook to alter record prior to insertion */
rt_gen_t rnh_gen; /* generation counter */
int rnh_multipath; /* multipath capable ? */
@@ -144,7 +143,6 @@ struct rtentry {
int rt_flags; /* up/down?, host/net */
int rt_refcnt; /* # held references */
- u_int rt_fibnum; /* which FIB */
u_long rt_weight; /* absolute weight */
u_long rt_expire; /* lifetime for route, e.g. redirect */
#define rt_endzero rt_mtx