aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/multipath_wrandom.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 02:03:42 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 02:03:42 -0400
commit3dcbbcda7c5b77c400791b26facd6593c5b176e0 (patch)
tree2e7b844c4d450cf43810a6ed0ddd5c702c245a88 /net/ipv4/multipath_wrandom.c
parentc972398b7871d9fb58c6a317786065a7cc6ca4be (diff)
parent6fbe59b9569b2c8d5522d182263935c6c86fc40a (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (160 commits) [ETHTOOL]: Remove some entries from non-root command list. [Bluetooth]: Fix section mismatch of bt_sysfs_cleanup() [Bluetooth]: Don't update disconnect timer for incoming connections [ETHTOOL]: let mortals use ethtool [NetLabel]: add audit support for configuration changes [TCP]: Fix and simplify microsecond rtt sampling [TCP] tcp-lp: prevent chance for oops [SUNRPC]: Remove unnecessary check in net/sunrpc/svcsock.c [IPVS] bug: endianness breakage in ip_vs_ftp [IPVS]: ipvs annotations [NETFILTER]: h323 annotations [NETFILTER]: ipt annotations [NETFILTER]: NAT annotations [NETFILTER]: conntrack annotations [NETFILTER]: netfilter misc annotations [NET]: Annotate dst_ops protocol [NET]: is it Andy or Andi ?? [IPVS]: Make sure ip_vs_ftp ports are valid: module_param_array approach [IPVS]: Reverse valid ip_vs_ftp ports fix: port check approach [IrDA] stir4200: removing undocumented bits handling ...
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{