Index: head/sys/net/route.c =================================================================== --- head/sys/net/route.c +++ head/sys/net/route.c @@ -426,11 +426,8 @@ 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 @@ } /* - * 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 @@ return (ENOBUFS); } rt->rt_flags = RTF_UP | flags; - rt->rt_fibnum = rnh->rib_fibnum; rt->rt_nhop = nh; /* Fill in dst */ Index: head/sys/net/route/route_var.h =================================================================== --- head/sys/net/route/route_var.h +++ head/sys/net/route/route_var.h @@ -50,7 +50,6 @@ 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 @@ 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