diff options
Diffstat (limited to 'net/ipv4/ipmr.c')
-rw-r--r-- | net/ipv4/ipmr.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 86033b7a05ba..30a7763c400e 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -2041,20 +2041,20 @@ rtattr_failure: | |||
2041 | return -EMSGSIZE; | 2041 | return -EMSGSIZE; |
2042 | } | 2042 | } |
2043 | 2043 | ||
2044 | int ipmr_get_route(struct net *net, | 2044 | int ipmr_get_route(struct net *net, struct sk_buff *skb, |
2045 | struct sk_buff *skb, struct rtmsg *rtm, int nowait) | 2045 | __be32 saddr, __be32 daddr, |
2046 | struct rtmsg *rtm, int nowait) | ||
2046 | { | 2047 | { |
2047 | int err; | ||
2048 | struct mr_table *mrt; | ||
2049 | struct mfc_cache *cache; | 2048 | struct mfc_cache *cache; |
2050 | struct rtable *rt = skb_rtable(skb); | 2049 | struct mr_table *mrt; |
2050 | int err; | ||
2051 | 2051 | ||
2052 | mrt = ipmr_get_table(net, RT_TABLE_DEFAULT); | 2052 | mrt = ipmr_get_table(net, RT_TABLE_DEFAULT); |
2053 | if (mrt == NULL) | 2053 | if (mrt == NULL) |
2054 | return -ENOENT; | 2054 | return -ENOENT; |
2055 | 2055 | ||
2056 | rcu_read_lock(); | 2056 | rcu_read_lock(); |
2057 | cache = ipmr_cache_find(mrt, rt->rt_src, rt->rt_dst); | 2057 | cache = ipmr_cache_find(mrt, saddr, daddr); |
2058 | 2058 | ||
2059 | if (cache == NULL) { | 2059 | if (cache == NULL) { |
2060 | struct sk_buff *skb2; | 2060 | struct sk_buff *skb2; |
@@ -2087,8 +2087,8 @@ int ipmr_get_route(struct net *net, | |||
2087 | skb_reset_network_header(skb2); | 2087 | skb_reset_network_header(skb2); |
2088 | iph = ip_hdr(skb2); | 2088 | iph = ip_hdr(skb2); |
2089 | iph->ihl = sizeof(struct iphdr) >> 2; | 2089 | iph->ihl = sizeof(struct iphdr) >> 2; |
2090 | iph->saddr = rt->rt_src; | 2090 | iph->saddr = saddr; |
2091 | iph->daddr = rt->rt_dst; | 2091 | iph->daddr = daddr; |
2092 | iph->version = 0; | 2092 | iph->version = 0; |
2093 | err = ipmr_cache_unresolved(mrt, vif, skb2); | 2093 | err = ipmr_cache_unresolved(mrt, vif, skb2); |
2094 | read_unlock(&mrt_lock); | 2094 | read_unlock(&mrt_lock); |