Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247062
b: refs/heads/master
c: 9a1b949
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed May 4, 2011
1 parent 7977911 commit 393b2b3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd927a2694ee412b440284dd72dd8e32caada3fc
refs/heads/master: 9a1b9496cd2b013f74885218947fa7120d53e74c
1 change: 1 addition & 0 deletions trunk/include/linux/mroute.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ struct mfc_cache {
#ifdef __KERNEL__
struct rtmsg;
extern int ipmr_get_route(struct net *net, struct sk_buff *skb,
__be32 saddr, __be32 daddr,
struct rtmsg *rtm, int nowait);
#endif

Expand Down
16 changes: 8 additions & 8 deletions trunk/net/ipv4/ipmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2041,20 +2041,20 @@ static int __ipmr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb,
return -EMSGSIZE;
}

int ipmr_get_route(struct net *net,
struct sk_buff *skb, struct rtmsg *rtm, int nowait)
int ipmr_get_route(struct net *net, struct sk_buff *skb,
__be32 saddr, __be32 daddr,
struct rtmsg *rtm, int nowait)
{
int err;
struct mr_table *mrt;
struct mfc_cache *cache;
struct rtable *rt = skb_rtable(skb);
struct mr_table *mrt;
int err;

mrt = ipmr_get_table(net, RT_TABLE_DEFAULT);
if (mrt == NULL)
return -ENOENT;

rcu_read_lock();
cache = ipmr_cache_find(mrt, rt->rt_src, rt->rt_dst);
cache = ipmr_cache_find(mrt, saddr, daddr);

if (cache == NULL) {
struct sk_buff *skb2;
Expand Down Expand Up @@ -2087,8 +2087,8 @@ int ipmr_get_route(struct net *net,
skb_reset_network_header(skb2);
iph = ip_hdr(skb2);
iph->ihl = sizeof(struct iphdr) >> 2;
iph->saddr = rt->rt_src;
iph->daddr = rt->rt_dst;
iph->saddr = saddr;
iph->daddr = daddr;
iph->version = 0;
err = ipmr_cache_unresolved(mrt, vif, skb2);
read_unlock(&mrt_lock);
Expand Down
4 changes: 3 additions & 1 deletion trunk/net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -2857,7 +2857,9 @@ static int rt_fill_info(struct net *net,

if (ipv4_is_multicast(dst) && !ipv4_is_local_multicast(dst) &&
IPV4_DEVCONF_ALL(net, MC_FORWARDING)) {
int err = ipmr_get_route(net, skb, r, nowait);
int err = ipmr_get_route(net, skb,
rt->rt_src, rt->rt_dst,
r, nowait);
if (err <= 0) {
if (!nowait) {
if (err == 0)
Expand Down

0 comments on commit 393b2b3

Please sign in to comment.