/*
- * Copyright (c) 2003-2007 Apple Inc. All rights reserved.
+ * Copyright (c) 2003-2008 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
static void in6_mtutimo(void *rock);
extern int tvtohz(struct timeval *);
+static struct radix_node *in6_matroute_args(void *, struct radix_node_head *,
+ rn_matchf_t *, void *);
+
#define RTPRF_OURS RTF_PROTO3 /* set on routes we manage */
/*
return ret;
}
+/*
+ * Similar to in6_matroute_args except without the leaf-matching parameters.
+ */
+static struct radix_node *
+in6_matroute(void *v_arg, struct radix_node_head *head)
+{
+ return (in6_matroute_args(v_arg, head, NULL, NULL));
+}
+
/*
* This code is the inverse of in6_clsroute: on first reference, if we
* were managing the route, stop doing so and set the expiration timer
* back off again.
*/
static struct radix_node *
-in6_matroute(void *v_arg, struct radix_node_head *head)
+in6_matroute_args(void *v_arg, struct radix_node_head *head,
+ rn_matchf_t *f, void *w)
{
- struct radix_node *rn = rn_match(v_arg, head);
+ struct radix_node *rn = rn_match_args(v_arg, head, f, w);
struct rtentry *rt = (struct rtentry *)rn;
if (rt && rt->rt_refcnt == 0) { /* this is first reference */
rt->rt_rmx.rmx_expire = 0;
}
}
- return rn;
+ return (rn);
}
SYSCTL_DECL(_net_inet6_ip6);
rnh = *head;
rnh->rnh_addaddr = in6_addroute;
rnh->rnh_matchaddr = in6_matroute;
+ rnh->rnh_matchaddr_args = in6_matroute_args;
rnh->rnh_close = in6_clsroute;
in6_rtqtimo(rnh); /* kick off timeout first time */
in6_mtutimo(rnh); /* kick off timeout first time */