diff options
| author | David S. Miller <davem@davemloft.net> | 2012-07-11 21:30:08 -0700 | 
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2012-07-11 21:30:08 -0700 | 
| commit | 1f42539d257af671d56d4bdbcf13aef31abff6ef (patch) | |
| tree | e48de1974ba75f1b31d90f8348ba6a5514dba526 | |
| parent | 55be7a9c6074f749d617a7fc1914c9a23505438c (diff) | |
| download | olio-linux-3.10-1f42539d257af671d56d4bdbcf13aef31abff6ef.tar.xz olio-linux-3.10-1f42539d257af671d56d4bdbcf13aef31abff6ef.zip  | |
ipv4: Kill ip_rt_redirect().
No longer needed, as the protocol handlers now all properly
propagate the redirect back into the routing code.
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | include/net/route.h | 1 | ||||
| -rw-r--r-- | net/ipv4/icmp.c | 1 | ||||
| -rw-r--r-- | net/ipv4/route.c | 44 | 
3 files changed, 0 insertions, 46 deletions
diff --git a/include/net/route.h b/include/net/route.h index 6ab93eeb866..ace3cb44251 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -108,7 +108,6 @@ extern struct ip_rt_acct __percpu *ip_rt_acct;  struct in_device;  extern int		ip_rt_init(void); -extern void		ip_rt_redirect(struct sk_buff *skb, __be32 new_gw);  extern void		rt_cache_flush(struct net *net, int how);  extern void		rt_cache_flush_batch(struct net *net);  extern struct rtable *__ip_route_output_key(struct net *, struct flowi4 *flp); diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 70a793559bb..d01aeb4d492 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -763,7 +763,6 @@ static void icmp_redirect(struct sk_buff *skb)  	if (!pskb_may_pull(skb, sizeof(struct iphdr)))  		return; -	ip_rt_redirect(skb, icmp_hdr(skb)->un.gateway);  	icmp_socket_deliver(skb, icmp_hdr(skb)->un.gateway);  } diff --git a/net/ipv4/route.c b/net/ipv4/route.c index aabece6b729..e98207dcd08 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1345,50 +1345,6 @@ reject_redirect:  	;  } -/* called in rcu_read_lock() section */ -void ip_rt_redirect(struct sk_buff *skb, __be32 new_gw) -{ -	const struct iphdr *iph = (const struct iphdr *) skb->data; -	__be32 daddr = iph->daddr; -	__be32 saddr = iph->saddr; -	struct net_device *dev = skb->dev; -	int    ikeys[2] = { dev->ifindex, 0 }; -	__be32 skeys[2] = { saddr, 0 }; -	struct net *net; -	int s, i; - -	net = dev_net(dev); -	for (s = 0; s < 2; s++) { -		for (i = 0; i < 2; i++) { -			unsigned int hash; -			struct rtable __rcu **rthp; -			struct rtable *rt; - -			hash = rt_hash(daddr, skeys[s], ikeys[i], rt_genid(net)); - -			rthp = &rt_hash_table[hash].chain; - -			while ((rt = rcu_dereference(*rthp)) != NULL) { -				rthp = &rt->dst.rt_next; - -				if (rt->rt_key_dst != daddr || -				    rt->rt_key_src != skeys[s] || -				    rt->rt_oif != ikeys[i] || -				    rt_is_input_route(rt) || -				    rt_is_expired(rt) || -				    !net_eq(dev_net(rt->dst.dev), net) || -				    rt->dst.error || -				    rt->dst.dev != dev) -					continue; - -				ip_do_redirect(&rt->dst, skb); -			} -		} -	} -	return; - -} -  static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst)  {  	struct rtable *rt = (struct rtable *)dst;  |