[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>
This commit is contained in:
parent
f20f4a60d7
commit
e8192f367c
1 changed files with 2 additions and 2 deletions
|
@ -128,8 +128,8 @@ static unsigned char __multipath_lookup_weight(const struct flowi *fl,
|
||||||
|
|
||||||
/* find state entry for destination */
|
/* find state entry for destination */
|
||||||
list_for_each_entry_rcu(d, &target_route->dests, list) {
|
list_for_each_entry_rcu(d, &target_route->dests, list) {
|
||||||
__u32 targetnetwork = fl->fl4_dst &
|
__be32 targetnetwork = fl->fl4_dst &
|
||||||
(0xFFFFFFFF >> (32 - d->prefixlen));
|
inet_make_mask(d->prefixlen);
|
||||||
|
|
||||||
if ((targetnetwork & d->netmask) == d->network) {
|
if ((targetnetwork & d->netmask) == d->network) {
|
||||||
weight = d->nh_info->nh_weight;
|
weight = d->nh_info->nh_weight;
|
||||||
|
|
Loading…
Reference in a new issue