summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2013-10-20 16:17:38 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2013-10-20 16:17:38 +0000
commitc241792a702211f0c848e496bac8d7020a756bae (patch)
treea114267b3cbc3568af4439e44e4a303db75c4383 /sys/net
parent24d13dc36badea814049d50495d58d87f2704de6 (diff)
Rename rn_mpath_count() to rn_mpath_active_count() since it will only
return the number of active aka RTF_UP multipath routes. OK grep & gcc
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/radix.c4
-rw-r--r--sys/net/radix_mpath.c8
-rw-r--r--sys/net/radix_mpath.h4
3 files changed, 8 insertions, 8 deletions
diff --git a/sys/net/radix.c b/sys/net/radix.c
index 642b3a52d66..0c0f7e09fa2 100644
--- a/sys/net/radix.c
+++ b/sys/net/radix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radix.c,v 1.30 2012/07/10 15:53:34 blambert Exp $ */
+/* $OpenBSD: radix.c,v 1.31 2013/10/20 16:17:36 claudio Exp $ */
/* $NetBSD: radix.c,v 1.20 2003/08/07 16:32:56 agc Exp $ */
/*
@@ -581,7 +581,7 @@ rn_addroute(void *v_arg, void *n_arg, struct radix_node_head *head,
break;
}
- mid = rn_mpath_count(tt) / 2;
+ mid = rn_mpath_active_count(tt) / 2;
do {
t = tt;
tt = rn_mpath_next(tt, 0);
diff --git a/sys/net/radix_mpath.c b/sys/net/radix_mpath.c
index b0994dccf0a..cf950583462 100644
--- a/sys/net/radix_mpath.c
+++ b/sys/net/radix_mpath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radix_mpath.c,v 1.20 2013/10/20 13:23:35 claudio Exp $ */
+/* $OpenBSD: radix_mpath.c,v 1.21 2013/10/20 16:17:36 claudio Exp $ */
/* $KAME: radix_mpath.c,v 1.13 2002/10/28 21:05:59 itojun Exp $ */
/*
@@ -179,7 +179,7 @@ rn_mpath_reprio(struct radix_node *rn, int newprio)
prioinv = 1;
t = tt;
} else {
- mid = rn_mpath_count(tt) / 2;
+ mid = rn_mpath_active_count(tt) / 2;
do {
t = tt;
tt = rn_mpath_next(tt, 0);
@@ -234,7 +234,7 @@ rn_mpath_reprio(struct radix_node *rn, int newprio)
}
int
-rn_mpath_count(struct radix_node *rn)
+rn_mpath_active_count(struct radix_node *rn)
{
int i;
@@ -413,7 +413,7 @@ rtalloc_mpath(struct route *ro, u_int32_t *srcaddrp)
#if defined(INET) || defined(INET6)
/* gw selection by Hash-Threshold (RFC 2992) */
rn = (struct radix_node *)ro->ro_rt;
- npaths = rn_mpath_count(rn);
+ npaths = rn_mpath_active_count(rn);
hash = rn_mpath_hash(ro, srcaddrp) & 0xffff;
threshold = 1 + (0xffff / npaths);
while (hash > threshold && rn) {
diff --git a/sys/net/radix_mpath.h b/sys/net/radix_mpath.h
index 6e5987317b3..9312ca4f9d0 100644
--- a/sys/net/radix_mpath.h
+++ b/sys/net/radix_mpath.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: radix_mpath.h,v 1.9 2010/05/07 13:33:16 claudio Exp $ */
+/* $OpenBSD: radix_mpath.h,v 1.10 2013/10/20 16:17:37 claudio Exp $ */
/* $KAME: radix_mpath.h,v 1.9 2004/03/30 11:21:49 keiichi Exp $ */
/*
@@ -48,7 +48,7 @@ int rn_mpath_capable(struct radix_node_head *);
struct radix_node *rn_mpath_next(struct radix_node *, int);
struct radix_node *rn_mpath_prio(struct radix_node *, u_int8_t);
void rn_mpath_reprio(struct radix_node *, int);
-int rn_mpath_count(struct radix_node *);
+int rn_mpath_active_count(struct radix_node *);
struct rtentry *rt_mpath_matchgate(struct rtentry *, struct sockaddr *,
u_int8_t);
int rt_mpath_conflict(struct radix_node_head *, struct rtentry *,