+/*
+ * Validate (unexpire) an expiring AF_INET route.
+ */
+struct radix_node *
+in_validate(struct radix_node *rn)
+{
+ struct rtentry *rt = (struct rtentry *)rn;
+
+ RT_LOCK_ASSERT_HELD(rt);
+
+ /* This is first reference? */
+ if (rt->rt_refcnt == 0) {
+ if (rt->rt_flags & RTPRF_OURS) {
+ /* It's one of ours; unexpire it */
+ rt->rt_flags &= ~RTPRF_OURS;
+ rt_setexpire(rt, 0);
+ } else if ((rt->rt_flags & RTF_LLINFO) &&
+ (rt->rt_flags & RTF_HOST) && rt->rt_gateway != NULL &&
+ rt->rt_gateway->sa_family == AF_LINK) {
+ /* It's ARP; let it be handled there */
+ arp_validate(rt);
+ }
+ }
+ return (rn);
+}
+
+/*
+ * Similar to in_matroute_args except without the leaf-matching parameters.
+ */
+static struct radix_node *
+in_matroute(void *v_arg, struct radix_node_head *head)
+{
+ return (in_matroute_args(v_arg, head, NULL, NULL));
+}
+