aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/multipath_wrandom.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/multipath_wrandom.c')
-rw-r--r--net/ipv4/multipath_wrandom.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/multipath_wrandom.c b/net/ipv4/multipath_wrandom.c
index d25ec4ae09e5..92b04823e034 100644
--- a/net/ipv4/multipath_wrandom.c
+++ b/net/ipv4/multipath_wrandom.c
@@ -60,8 +60,8 @@ struct multipath_dest {
60 struct list_head list; 60 struct list_head list;
61 61
62 const struct fib_nh *nh_info; 62 const struct fib_nh *nh_info;
63 __u32 netmask; 63 __be32 netmask;
64 __u32 network; 64 __be32 network;
65 unsigned char prefixlen; 65 unsigned char prefixlen;
66 66
67 struct rcu_head rcu; 67 struct rcu_head rcu;
@@ -76,7 +76,7 @@ struct multipath_route {
76 struct list_head list; 76 struct list_head list;
77 77
78 int oif; 78 int oif;
79 __u32 gw; 79 __be32 gw;
80 struct list_head dests; 80 struct list_head dests;
81 81
82 struct rcu_head rcu; 82 struct rcu_head rcu;
@@ -128,8 +128,8 @@ static unsigned char __multipath_lookup_weight(const struct flowi *fl,
128 128
129 /* find state entry for destination */ 129 /* find state entry for destination */
130 list_for_each_entry_rcu(d, &target_route->dests, list) { 130 list_for_each_entry_rcu(d, &target_route->dests, list) {
131 __u32 targetnetwork = fl->fl4_dst & 131 __be32 targetnetwork = fl->fl4_dst &
132 (0xFFFFFFFF >> (32 - d->prefixlen)); 132 inet_make_mask(d->prefixlen);
133 133
134 if ((targetnetwork & d->netmask) == d->network) { 134 if ((targetnetwork & d->netmask) == d->network) {
135 weight = d->nh_info->nh_weight; 135 weight = d->nh_info->nh_weight;
@@ -217,8 +217,8 @@ static void wrandom_select_route(const struct flowi *flp,
217 *rp = decision; 217 *rp = decision;
218} 218}
219 219
220static void wrandom_set_nhinfo(__u32 network, 220static void wrandom_set_nhinfo(__be32 network,
221 __u32 netmask, 221 __be32 netmask,
222 unsigned char prefixlen, 222 unsigned char prefixlen,
223 const struct fib_nh *nh) 223 const struct fib_nh *nh)
224{ 224{