diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-09-27 01:26:21 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-28 21:01:17 -0400 |
commit | e8192f367cb3dcbefaa4109d26f3b1645b0c6b56 (patch) | |
tree | 983e897fce2b94831b64b125b16fba386cc66325 /net/ipv4/multipath_wrandom.c | |
parent | f20f4a60d74b0d7e2a5dafd5e7d5760f44ce2f30 (diff) |
[IPV4] bug: broken open-coded inet_make_mask() (multipath_wrandom)
multipath_wrandom.c::__multipath_lookup_weight() contains open-coded
attempt at inet_make_mask(); broken on big-endian.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/multipath_wrandom.c')
-rw-r--r-- | net/ipv4/multipath_wrandom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/multipath_wrandom.c b/net/ipv4/multipath_wrandom.c index 32dbd6906a5d..92b04823e034 100644 --- a/net/ipv4/multipath_wrandom.c +++ b/net/ipv4/multipath_wrandom.c | |||
@@ -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; |