diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-12 02:04:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-12 18:08:49 -0500 |
commit | da91981bee8de20bcd06ee0dbddd53d62d23b1bd (patch) | |
tree | 4c99ba1fa3a44614b434626b7ebfe1f4ce677e93 /net/ipv4 | |
parent | 9ade22861f922344788321e374c542c92bc049b6 (diff) |
ipv4: Use flowi4 in ipmr code.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ipmr.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 3b72b0a26d7e..1f62eaeb6de4 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -148,14 +148,15 @@ static struct mr_table *ipmr_get_table(struct net *net, u32 id) | |||
148 | return NULL; | 148 | return NULL; |
149 | } | 149 | } |
150 | 150 | ||
151 | static int ipmr_fib_lookup(struct net *net, struct flowi *flp, | 151 | static int ipmr_fib_lookup(struct net *net, struct flowi4 *flp4, |
152 | struct mr_table **mrt) | 152 | struct mr_table **mrt) |
153 | { | 153 | { |
154 | struct ipmr_result res; | 154 | struct ipmr_result res; |
155 | struct fib_lookup_arg arg = { .result = &res, }; | 155 | struct fib_lookup_arg arg = { .result = &res, }; |
156 | int err; | 156 | int err; |
157 | 157 | ||
158 | err = fib_rules_lookup(net->ipv4.mr_rules_ops, flp, 0, &arg); | 158 | err = fib_rules_lookup(net->ipv4.mr_rules_ops, |
159 | flowi4_to_flowi(flp4), 0, &arg); | ||
159 | if (err < 0) | 160 | if (err < 0) |
160 | return err; | 161 | return err; |
161 | *mrt = res.mrt; | 162 | *mrt = res.mrt; |
@@ -283,7 +284,7 @@ static struct mr_table *ipmr_get_table(struct net *net, u32 id) | |||
283 | return net->ipv4.mrt; | 284 | return net->ipv4.mrt; |
284 | } | 285 | } |
285 | 286 | ||
286 | static int ipmr_fib_lookup(struct net *net, struct flowi *flp, | 287 | static int ipmr_fib_lookup(struct net *net, struct flowi4 *flp4, |
287 | struct mr_table **mrt) | 288 | struct mr_table **mrt) |
288 | { | 289 | { |
289 | *mrt = net->ipv4.mrt; | 290 | *mrt = net->ipv4.mrt; |
@@ -435,14 +436,14 @@ static netdev_tx_t reg_vif_xmit(struct sk_buff *skb, struct net_device *dev) | |||
435 | { | 436 | { |
436 | struct net *net = dev_net(dev); | 437 | struct net *net = dev_net(dev); |
437 | struct mr_table *mrt; | 438 | struct mr_table *mrt; |
438 | struct flowi fl = { | 439 | struct flowi4 fl4 = { |
439 | .flowi_oif = dev->ifindex, | 440 | .flowi4_oif = dev->ifindex, |
440 | .flowi_iif = skb->skb_iif, | 441 | .flowi4_iif = skb->skb_iif, |
441 | .flowi_mark = skb->mark, | 442 | .flowi4_mark = skb->mark, |
442 | }; | 443 | }; |
443 | int err; | 444 | int err; |
444 | 445 | ||
445 | err = ipmr_fib_lookup(net, &fl, &mrt); | 446 | err = ipmr_fib_lookup(net, &fl4, &mrt); |
446 | if (err < 0) { | 447 | if (err < 0) { |
447 | kfree_skb(skb); | 448 | kfree_skb(skb); |
448 | return err; | 449 | return err; |
@@ -1789,18 +1790,18 @@ dont_forward: | |||
1789 | 1790 | ||
1790 | static struct mr_table *ipmr_rt_fib_lookup(struct net *net, struct rtable *rt) | 1791 | static struct mr_table *ipmr_rt_fib_lookup(struct net *net, struct rtable *rt) |
1791 | { | 1792 | { |
1792 | struct flowi fl = { | 1793 | struct flowi4 fl4 = { |
1793 | .fl4_dst = rt->rt_key_dst, | 1794 | .daddr = rt->rt_key_dst, |
1794 | .fl4_src = rt->rt_key_src, | 1795 | .saddr = rt->rt_key_src, |
1795 | .fl4_tos = rt->rt_tos, | 1796 | .flowi4_tos = rt->rt_tos, |
1796 | .flowi_oif = rt->rt_oif, | 1797 | .flowi4_oif = rt->rt_oif, |
1797 | .flowi_iif = rt->rt_iif, | 1798 | .flowi4_iif = rt->rt_iif, |
1798 | .flowi_mark = rt->rt_mark, | 1799 | .flowi4_mark = rt->rt_mark, |
1799 | }; | 1800 | }; |
1800 | struct mr_table *mrt; | 1801 | struct mr_table *mrt; |
1801 | int err; | 1802 | int err; |
1802 | 1803 | ||
1803 | err = ipmr_fib_lookup(net, &fl, &mrt); | 1804 | err = ipmr_fib_lookup(net, &fl4, &mrt); |
1804 | if (err) | 1805 | if (err) |
1805 | return ERR_PTR(err); | 1806 | return ERR_PTR(err); |
1806 | return mrt; | 1807 | return mrt; |