summaryrefslogtreecommitdiffstats
path: root/sys/net/radix_mpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/radix_mpath.c')
-rw-r--r--sys/net/radix_mpath.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/radix_mpath.c b/sys/net/radix_mpath.c
index c02f0ff..d3ce92c 100644
--- a/sys/net/radix_mpath.c
+++ b/sys/net/radix_mpath.c
@@ -223,7 +223,7 @@ rt_mpath_selectrte(struct rtentry *rte, uint32_t hash)
hash %= total_weight;
for (weight = abs((int32_t)hash);
rt != NULL && weight >= rt->rt_weight;
- weight -= rt->rt_weight) {
+ weight -= (rt == NULL) ? 0 : rt->rt_weight) {
/* stay within the multipath routes */
if (rn->rn_dupedkey && rn->rn_mask != rn->rn_dupedkey->rn_mask)
OpenPOWER on IntegriCloud