Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189168
b: refs/heads/master
c: 6a2bad7
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Mar 27, 2010
1 parent 0b53e6f commit 343f137
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 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: b35ecb5d404c00f2420221ccbb1bbba1139353a4
refs/heads/master: 6a2bad70d546cf30a46bc6d9ec0cb9a0891a38eb
17 changes: 11 additions & 6 deletions trunk/net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ static int slow_chain_length(const struct rtable *head)
}

static int rt_intern_hash(unsigned hash, struct rtable *rt,
struct rtable **rp, struct sk_buff *skb)
struct rtable **rp, struct sk_buff *skb, int ifindex)
{
struct rtable *rth, **rthp;
unsigned long now;
Expand Down Expand Up @@ -1217,6 +1217,11 @@ static int rt_intern_hash(unsigned hash, struct rtable *rt,
rt->u.dst.dev->name, num);
}
rt_emergency_hash_rebuild(net);
spin_unlock_bh(rt_hash_lock_addr(hash));

hash = rt_hash(rt->fl.fl4_dst, rt->fl.fl4_src,
ifindex, rt_genid(net));
goto restart;
}
}

Expand Down Expand Up @@ -1477,7 +1482,7 @@ void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 new_gw,
&netevent);

rt_del(hash, rth);
if (!rt_intern_hash(hash, rt, &rt, NULL))
if (!rt_intern_hash(hash, rt, &rt, NULL, rt->fl.oif))
ip_rt_put(rt);
goto do_next;
}
Expand Down Expand Up @@ -1931,7 +1936,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,

in_dev_put(in_dev);
hash = rt_hash(daddr, saddr, dev->ifindex, rt_genid(dev_net(dev)));
return rt_intern_hash(hash, rth, NULL, skb);
return rt_intern_hash(hash, rth, NULL, skb, dev->ifindex);

e_nobufs:
in_dev_put(in_dev);
Expand Down Expand Up @@ -2098,7 +2103,7 @@ static int ip_mkroute_input(struct sk_buff *skb,
/* put it into the cache */
hash = rt_hash(daddr, saddr, fl->iif,
rt_genid(dev_net(rth->u.dst.dev)));
return rt_intern_hash(hash, rth, NULL, skb);
return rt_intern_hash(hash, rth, NULL, skb, fl->iif);
}

/*
Expand Down Expand Up @@ -2255,7 +2260,7 @@ out: return err;
}
rth->rt_type = res.type;
hash = rt_hash(daddr, saddr, fl.iif, rt_genid(net));
err = rt_intern_hash(hash, rth, NULL, skb);
err = rt_intern_hash(hash, rth, NULL, skb, fl.iif);
goto done;

no_route:
Expand Down Expand Up @@ -2502,7 +2507,7 @@ static int ip_mkroute_output(struct rtable **rp,
if (err == 0) {
hash = rt_hash(oldflp->fl4_dst, oldflp->fl4_src, oldflp->oif,
rt_genid(dev_net(dev_out)));
err = rt_intern_hash(hash, rth, rp, NULL);
err = rt_intern_hash(hash, rth, rp, NULL, oldflp->oif);
}

return err;
Expand Down

0 comments on commit 343f137

Please sign in to comment.