summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-12 02:04:50 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-12 15:08:49 -0800
commitda91981bee8de20bcd06ee0dbddd53d62d23b1bd (patch)
tree4c99ba1fa3a44614b434626b7ebfe1f4ce677e93 /net/ipv4
parent9ade22861f922344788321e374c542c92bc049b6 (diff)
downloadop-kernel-dev-da91981bee8de20bcd06ee0dbddd53d62d23b1bd.zip
op-kernel-dev-da91981bee8de20bcd06ee0dbddd53d62d23b1bd.tar.gz
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.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 3b72b0a..1f62eae 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)
return NULL;
}
-static int ipmr_fib_lookup(struct net *net, struct flowi *flp,
+static int ipmr_fib_lookup(struct net *net, struct flowi4 *flp4,
struct mr_table **mrt)
{
struct ipmr_result res;
struct fib_lookup_arg arg = { .result = &res, };
int err;
- err = fib_rules_lookup(net->ipv4.mr_rules_ops, flp, 0, &arg);
+ err = fib_rules_lookup(net->ipv4.mr_rules_ops,
+ flowi4_to_flowi(flp4), 0, &arg);
if (err < 0)
return err;
*mrt = res.mrt;
@@ -283,7 +284,7 @@ static struct mr_table *ipmr_get_table(struct net *net, u32 id)
return net->ipv4.mrt;
}
-static int ipmr_fib_lookup(struct net *net, struct flowi *flp,
+static int ipmr_fib_lookup(struct net *net, struct flowi4 *flp4,
struct mr_table **mrt)
{
*mrt = net->ipv4.mrt;
@@ -435,14 +436,14 @@ static netdev_tx_t reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct net *net = dev_net(dev);
struct mr_table *mrt;
- struct flowi fl = {
- .flowi_oif = dev->ifindex,
- .flowi_iif = skb->skb_iif,
- .flowi_mark = skb->mark,
+ struct flowi4 fl4 = {
+ .flowi4_oif = dev->ifindex,
+ .flowi4_iif = skb->skb_iif,
+ .flowi4_mark = skb->mark,
};
int err;
- err = ipmr_fib_lookup(net, &fl, &mrt);
+ err = ipmr_fib_lookup(net, &fl4, &mrt);
if (err < 0) {
kfree_skb(skb);
return err;
@@ -1789,18 +1790,18 @@ dont_forward:
static struct mr_table *ipmr_rt_fib_lookup(struct net *net, struct rtable *rt)
{
- struct flowi fl = {
- .fl4_dst = rt->rt_key_dst,
- .fl4_src = rt->rt_key_src,
- .fl4_tos = rt->rt_tos,
- .flowi_oif = rt->rt_oif,
- .flowi_iif = rt->rt_iif,
- .flowi_mark = rt->rt_mark,
+ struct flowi4 fl4 = {
+ .daddr = rt->rt_key_dst,
+ .saddr = rt->rt_key_src,
+ .flowi4_tos = rt->rt_tos,
+ .flowi4_oif = rt->rt_oif,
+ .flowi4_iif = rt->rt_iif,
+ .flowi4_mark = rt->rt_mark,
};
struct mr_table *mrt;
int err;
- err = ipmr_fib_lookup(net, &fl, &mrt);
+ err = ipmr_fib_lookup(net, &fl4, &mrt);
if (err)
return ERR_PTR(err);
return mrt;
OpenPOWER on IntegriCloud